OSDN Git Service

SDL_atomic_t サンプルコードを修正 https://wiki.libsdl.org/SDL_atomic_t?action=diff&rev1=3&rev2=4
[sdl2referencejp/sdl2referencejp.git] / SDLNet_DelSocket.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="ja-JP">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <meta name="keywords" content="SDL_net">
7 <link rel="top" href="index.html" title="\83z\81[\83\80">
8 <link rel="parent" href="SDL_net-functions-socket_sets.html" title="1\82Â\8fã">
9 <title>SDLNet_DelSocket</title>
10 </head>
11 <body>
12 <a href="index.html#SDL_net">\96Ú\8e\9f</a> - <a href="SDL_net-functions.html">3.\8aÖ\90\94</a> - <a href="SDL_net-functions-socket_sets.html">3.6\83\\83P\83b\83g\83Z\83b\83g</a> - SDLNet_DelSocket
13 <hr>
14 <h1>SDLNet_DelSocket</h1>
15 <p>
16 <code>int SDLNet_DelSocket(SDLNet_SocketSet set, SDLNet_GenericSocket sock)</code><br>
17 <code>int SDLNet_TCP_DelSocket(SDLNet_SocketSet set, TCPsocket sock)</code><br>
18 <code>int SDLNet_UDP_DelSocket(SDLNet_SocketSet set, UDPsocket sock)</code>
19 </p>
20 <p>
21 <dl>
22 <dt>set</dt><dd>\83\\83P\83b\83g\83Z\83b\83g\82©\82ç\8dí\8f\9c\82·\82é\83\\83P\83b\83g</dd>
23 <dt>sock</dt><dd>set\82©\82ç\8dí\8f\9c\82·\82é\83\\83P\83b\83g</dd>
24 </dl>
25 </p>
26 <p>
27 \83\\83P\83b\83g\82ð\83\\83P\83b\83g\83Z\83b\83g\82©\82ç\8dí\8f\9c\82·\82é.
28 \83\\83P\83b\83g\83Z\83b\83g\82Å\8aÄ\8e\8b\82µ\82Ä\82¢\82é\83\\83P\83b\83g\82ð\95Â\82\82é\91O\82É\8eg\82¤\95K\97v\82ª\82 \82é.
29 \82±\82Ì\8aÖ\90\94\82Í\83\\83P\83b\83g\82ð\95Â\82\82È\82¢.
30 TCP\82Ü\82½\82ÍUDP\83\\83P\83b\83g\82Å\93K\90Ø\82È\83}\83N\83\8d\82ð\8cÄ\82Ô\95K\97v\82ª\82 \82é.
31 \94Ä\97p\83\\83P\83b\83g\8aÖ\90\94\82ÍTCP\82ÆUDP\82Ì\83}\83N\83\8d\82ð\8cÄ\82ñ\82Å\82¢\82é.
32 </p>
33 <p>
34 \96ß\82è\92l: \90¬\8c÷\82Ì\82Æ\82«set\93à\82Ì\83\\83P\83b\83g\82Ì\90\94\8e¸\94s\82Ì\82Æ\82«-1
35 </p>
36 <h2>\83T\83\93\83v\83\8b\83R\81[\83h</h2>
37 <code>
38 <pre>
39 // \83\\83P\83b\83g\83Z\83b\83g\82©\82ç2\82Â\82Ì\83\\83P\83b\83g\82ð\8dí\8f\9c\82·\82é
40 //SDLNet_SocketSet set;
41 //UDPsocket udpsock;
42 //TCPsocket tcpsock;
43 int numused;
44
45 numused=SDLNet_UDP_DelSocket(set,udpsock);
46 if(numused==-1) {
47     printf("SDLNet_DelSocket: %s\n", SDLNet_GetError());
48     // \8b°\82ç\82­\83\\83P\83b\83g\82ª\83Z\83b\83g\82³\82ê\82Ä\82¢\82È\82¢
49 }
50 numused=SDLNet_TCP_DelSocket(set,tcpsock);
51 if(numused==-1) {
52     printf("SDLNet_DelSocket: %s\n", SDLNet_GetError());
53     // \8b°\82ç\82­\83\\83P\83b\83g\82ª\83Z\83b\83g\82³\82ê\82Ä\82¢\82È\82¢
54 }
55 </pre>
56 </code>
57 <h2>\8eQ\8fÆ</h2>
58 <a href="SDLNet_AddSocket.html">SDLNet_AddSocket</a>,
59 <a href="SDLNet_FreeSocketSet.html">SDLNet_FreeSocketSet</a>,
60 <a href="SDLNet_SocketSet.html">SDLNet_SocketSet</a>,
61 <a href="UDPsocket.html">UDPsocket</a>,
62 <a href="TCPsocket.html">TCPsocket</a>
63 <h2>\8c´\95\82Ö\82Ì\83\8a\83\93\83N</h2>
64 <a href="http://www.libsdl.org/projects/SDL_net/docs/SDL_net_45.html#SEC45">3.6.4 SDLNet_DelSocket</a>
65 <hr>
66 </body>
67 </html>