blob: 4b893570f8a0784eb9997673e278e62ba1a37731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
---
title: Server-sent events
slug: Web/API/Server-sent_events
tags:
- API
- Overview
- SSE
- Server-sent events
translation_of: Web/API/Server-sent_events
---
<p>{{DefaultAPISidebar("Server Sent Events")}}</p>
<p>전통적으로 웹페이지는 새로운 데이터를 받기 위해 서버로 요청을 보내야만 합니다; 서버로 데이터를 요청하는 방식입니다. 하지만 Server-Sent Events 방식으로 웹페이지의 요청 없이도 언제든지 서버가 새로운 데이터를 보내는 것이 가능합니다. 이렇게 보내진 메시지는 웹페이지 안에서 <em><a href="/en-US/docs/DOM/event">Events</a> + 데이터</em>로 다룰 수 있습니다.</p>
<h2 id="기본_사용하기">기본 & 사용하기</h2>
<p>Server-Sent Events를 배우려면 다음 글을 읽어보세요: <a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Server-Sent Events 사용하기</a>.</p>
<h2 id="Interfaces" name="Interfaces">인터페이스</h2>
<dl>
<dt>{{domxref("EventSource")}}</dt>
<dd>서버와의 연결, 이벤트/데이터, 에러 받아오기, 연결 종료하기 등을 다루는 모든 기능을 정의하고 있습니다.</dd>
</dl>
<h2 id="예제">예제</h2>
<ul>
<li><a href="https://github.com/mdn/dom-examples/tree/master/server-sent-events">PHP를 이용하여 구현한 간단한 SSE 데모</a></li>
</ul>
<h2 id="명세">명세</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', '#server-sent-events', 'Server-sent events')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="See_also" name="See_also">더 찾아보기</h2>
<h3 id="Tools" name="Tools">도구</h3>
<ul>
<li><a href="https://github.com/EventSource/eventsource">Node.js를 위한 EventSource 폴리필</a></li>
<li>Remy Sharp의 <a class="link-https" href="https://github.com/remy/polyfills/blob/master/EventSource.js">EventSource 폴리필</a></li>
<li>Yaffle의 <a class="link-https" href="https://github.com/Yaffle/EventSource" title="https://github.com/Yaffle/EventSource">EventSource 폴리필</a></li>
<li>Rick Waldron <a class="link-https" href="https://github.com/rwldrn/jquery.eventsource">jquery 플러그인</a></li>
<li><a href="http://intercoolerjs.org/docs.html#sse">선언적인 SSE를 지원하는 </a>intercooler.js</li>
</ul>
<h3 id="Related_Topics" name="Related_Topics">관련 주제</h3>
<ul>
<li><a href="/en-US/docs/AJAX" title="AJAX">AJAX</a></li>
<li><a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a></li>
<li><a href="/en-US/docs/WebSockets" title="WebSockets">WebSockets</a></li>
</ul>
<h3 id="그_외_자료">그 외 자료</h3>
<ul>
<li>SSE로 구현된 <a href="http://hacks.mozilla.org/2011/06/a-wall-powered-by-eventsource-and-server-sent-events/" title="http://hacks.mozilla.org/2011/06/a-wall-powered-by-eventsource-and-server-sent-events/">Twitter 어플리케이션</a>과 <a class="link-https" href="https://github.com/mozilla/webowonder-demos/tree/master/demos/friends%20timeline" title="https://github.com/mozilla/webowonder-demos/tree/master/demos/friends timeline">깃허브에 공개된 소스코드</a>.</li>
<li><a href="http://dsheiko.com/weblog/html5-and-server-sent-events" title="http://dsheiko.com/weblog/html5-and-server-sent-events">HTML5와 Server-sent events</a></li>
<li><a href="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html" title="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html">Asp.net을 이용한 Server-Sent Events</a></li>
</ul>
|