Skip to content

Commit d01b33b

Browse files
committed
Sync SDL3_net wiki -> header
[ci skip]
1 parent e5b54a4 commit d01b33b

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

include/SDL3_net/SDL_net.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@
5353
* connect to these hosts over the Internet.
5454
*
5555
* Something that initiates a connection to a remote system is called a
56-
* "client," connecting to a "server." To establish a connection, use
57-
* the NET_Address you resolved with NET_CreateClient(). Once the connection
58-
* is established (a non-blocking operation), you'll have a NET_StreamSocket
56+
* "client," connecting to a "server." To establish a connection, use the
57+
* NET_Address you resolved with NET_CreateClient(). Once the connection is
58+
* established (a non-blocking operation), you'll have a NET_StreamSocket
5959
* object that can send and receive data over the connection, using
6060
* NET_WriteToStreamSocket() and NET_ReadFromStreamSocket().
6161
*
62-
* To instead be a server, that clients connect to, call
63-
* NET_CreateServer() to get a NET_Server object. All a NET_Server does is
64-
* allow you to accept connections from clients, turning them into
65-
* NET_StreamSockets, where you can read and write from the opposite side of
66-
* the connection from a given client.
62+
* To instead be a server, that clients connect to, call NET_CreateServer() to
63+
* get a NET_Server object. All a NET_Server does is allow you to accept
64+
* connections from clients, turning them into NET_StreamSockets, where you
65+
* can read and write from the opposite side of the connection from a given
66+
* client.
6767
*
6868
* These things are, underneath this API, TCP connections, which means you can
6969
* use a client or server to talk to something that _isn't_ using SDL_net at
@@ -73,21 +73,21 @@
7373
* There are tradeoffs to using these, especially in poor network conditions.
7474
* Another option is to use "datagram sockets," which map to UDP packet
7575
* transmission. With datagrams, everyone involved can send small packets of
76-
* data that may arrive in any order, or not at all, but transmission
77-
* can carry on if a packet is lost, each packet is clearly separated
78-
* from every other, and communication can happen in a peer-to-peer model
79-
* instead of client-server: while datagrams can be more complex, these _are_
80-
* useful properties not avaiable to stream sockets.
81-
* NET_CreateDatagramSocket() is used to prepare for datagram communication,
82-
* then NET_SendDatagram() and NET_ReceiveDatagram() transmit packets.
76+
* data that may arrive in any order, or not at all, but transmission can
77+
* carry on if a packet is lost, each packet is clearly separated from every
78+
* other, and communication can happen in a peer-to-peer model instead of
79+
* client-server: while datagrams can be more complex, these _are_ useful
80+
* properties not avaiable to stream sockets. NET_CreateDatagramSocket() is
81+
* used to prepare for datagram communication, then NET_SendDatagram() and
82+
* NET_ReceiveDatagram() transmit packets.
8383
*
8484
* As previously mentioned, SDL_net's API is "non-blocking" (asynchronous).
8585
* Any network operation might take time, but SDL_net's APIs will not wait
86-
* until they complete. Any operation will return immediately, with options
87-
* to check if the operation has completed later. Generally this is what
88-
* a video game needs, but there are times where it makes sense to pause
89-
* until an operation completes; in a background thread this might make
90-
* sense, as it could simplify the code dramatically.
86+
* until they complete. Any operation will return immediately, with options to
87+
* check if the operation has completed later. Generally this is what a video
88+
* game needs, but there are times where it makes sense to pause until an
89+
* operation completes; in a background thread this might make sense, as it
90+
* could simplify the code dramatically.
9191
*
9292
* The functions that block until an operation completes:
9393
*

0 commit comments

Comments
 (0)