Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

uIP application functions
[The uIP TCP/IP stack]


Detailed Description

Functions used by an application running of top of uIP.

uIP »óÀ§¿¡¼­ µ¿ÀÛÇÏ´Â ¾îÇø®ÄÉÀ̼ǿ¡ÀÇ »ç¿ëµÇ´Â ÇÔ¼ö.



Defines

#define uip_send(data, len)
 Send data on the current connection.
µ¥ÀÌÅ͸¦ ÇöÀç ¿¬°á¿¡ ¼Û½Å.

#define uip_datalen()
 The length of any incoming data that is currently avaliable (if avaliable) in the uip_appdata buffer.
uip_appdata ¹öÆÛ¿¡¼­ ÇöÀç À¯È¿ÇÑ ÀԷµ¥ÀÌÅÍÀÇ ±æÀÌ.

#define uip_urgdatalen()
 The length of any out-of-band data (urgent data) that has arrived on the connection.
¼ö½ÅµÈ µ¥ÀÌÅÍÁß ¹êµå¸¦ ¹þ¾î³­ µ¥ÀÌÅÍÀÇ ±æÀÌ.

#define uip_close()
 Close the current connection.
ÇöÀç ¿¬°áÀ» ´ÝÀ½.

#define uip_abort()
 Abort the current connection.
ÇöÀç ¿¬°áÀ» ÁßÁö.

#define uip_stop()
 Tell the sending host to stop sending data.
¼Û½Å È£½ºÆ®¿¡°Ô µ¥ÀÌÅÍ ¼Û½ÅÀ» ÁßÁöÇÔÀ» ¾Ë¸².

#define uip_stopped(conn)
 Find out if the current connection has been previously stopped with uip_stop().
ÇöÀç ¿¬°áÀÌ uip_stop()À¸·Î Àü¿¡ Á¤Áö µÇ¾ú´ÂÁö¸¦ °Ë»ç.

#define uip_restart()
 Restart the current connection, if is has previously been stopped with uip_stop().
uip_stop()À¸·Î Àü¿¡ Á¤Áö µÇ¾ú´Ù¸é ÇöÀç ¿¬°áÀ» Àç ½ÃÀÛ.

#define uip_newdata()
 Is new incoming data available?
»õ·Î ÀÔ·ÂµÈ µ¥ÀÌÅͰ¡ À¯È¿ÇѰ¡?

#define uip_acked()
 Has previously sent data been acknowledged?
ack¸¦ ¹ÞÀº µ¥ÀÌÅ͸¦ ÀÌÀü¿¡ ¼Û½Å Çߴ°¡?.

#define uip_connected()
 Has the connection just been connected?
Á¢¼ÓÀÌ ¿¬°á µÇ¾ú´Â°¡?

#define uip_closed()
 Has the connection been closed by the other end?
¿¬°áÀÌ ´Ù¸¥ ³ëµå¿¡ ÀÇÇØ ´ÝÇû´Â°¡?

#define uip_aborted()
 Has the connection been aborted by the other end?
¿¬°áÀÌ ´Ù¸¥ ³ëµå¿¡ ÀÇÇØ ÁßÁö µÇ¾ú´Â°¡?

#define uip_timedout()
 Has the connection timed out?
¿¬°áÀÌ Å¸ÀÓ ¾Æ¿ô µÇ¾ú´Â°¡?

#define uip_rexmit()
 Do we need to retransmit previously data?
Àü µ¥ÀÌÅ͸¦ ÀçÀü¼Û ÇÒ Çʿ䰡 Àִ°¡?

#define uip_poll()
 Is the connection being polled by uIP?
¿¬°áÀÌ uIP¿¡ ÀÇÇØ Æú¸µµÇ°í Àִ°¡?

#define uip_initialmss()
 Get the initial maxium segment size (MSS) of the current connection.
ÇöÀç ¿¬°á¿¡¼­ Ãʱâ ÃÖ´ë ¼¼±×¸ÕÆ® »çÀÌÁî(MSS)¸¦ ¾òÀ½.

#define uip_mss()
 Get the current maxium segment size that can be sent on the current connection.
ÇöÀç ¿¬°á¿¡¼­ ¼Û½ÅµÉ ¼ö ÀÖ´Â ÃÖ´ë ¼¼±×¸ÕÆ® »çÀÌÁ ¾òÀ½.

#define uip_udp_remove(conn)
 Removed a UDP connection.
UDP ¿¬°áÀ» Á¦°Å.

#define uip_udp_send(len)
 Send a UDP datagram of length len on the current connection.
ÇöÀç ¿¬°á¿¡¼­ len±æÀÌ ¸¸Å­ÀÇ UDP µ¥ÀÌÅͱ׷¥À» ¼Û½Å.


Functions

void uip_listen (u16_t port)
 Start listening to the specified port.
ÁöÁ¤µÈ Æ÷Æ®¿¡¼­ ¸®½¼(listening)À» ½ÃÀÛ.

void uip_unlisten (u16_t port)
 Stop listening to the specified port.
ÁöÁ¤µÈ Æ÷Æ®¿¡¼­ ¸®½¼(listening)À» ÁßÁö.

uip_connuip_connect (u16_t *ripaddr, u16_t port)
 Connect to a remote host using TCP.
TCP¸¦ »ç¿ëÇÏ´Â ¿ø°ÝÁö È£½ºÆ®¿Í ¿¬°á.

uip_udp_connuip_udp_new (u16_t *ripaddr, u16_t rport)
 Set up a new UDP connection.
»õ·Î¿î UDP ¿¬°áÀ» ¼³Á¤.


Define Documentation

#define uip_abort  ) 
 

Abort the current connection.

ÇöÀç ¿¬°áÀ» ÁßÁö.


This function will abort (reset) the current connection, and is usually used when an error has occured that prevents using the uip_close() function.

ÀÌ ÇÔ¼ö´Â ÇöÀç ¿¬°áÀ» ÁßÁöÇϰí uip_close()ÇÔ¼ö¸¦ »ç¿ëÇÏÁö ¸øÇÏ´Â ¿¡·¯°¡ ¹ß»ýÇßÀ» ¶§ »ç¿ëµÈ´Ù.

#define uip_aborted  ) 
 

Has the connection been aborted by the other end?

¿¬°áÀÌ ´Ù¸¥ ³ëµå¿¡ ÀÇÇØ ÁßÁö µÇ¾ú´Â°¡?


Non-zero if the current connection has been aborted (reset) by the remote host.

ÇöÀç ¿¬°áÀÌ ¿ø°ÝÁö È£½ºÆ®¿¡ÀÇÇØ ÁßÁö µÇ¾úÀ¸¸é 0ÀÌ ¾Æ´Ñ°ª.

#define uip_acked  ) 
 

Has previously sent data been acknowledged?

ack¸¦ ¹ÞÀº µ¥ÀÌÅ͸¦ ÀÌÀü¿¡ ¼Û½Å Çߴ°¡?


Will reduce to non-zero if the previously sent data has been acknowledged by the remote host. This means that the application can send new data.

Àü¿¡ ¼Û½ÅÇÑ µ¥ÀÌÅÍ¿¡ ´ëÇØ ¿ø°ÝÁö È£½ºÆ®¿¡¼­ ack°¡ ¿À¸é 0ÀÌ ¾Æ´Ñ °ªÀ» ¸®ÅÏ. À̰ÍÀº ¾îÇø®ÄÉÀ̼ÇÀÌ »õ·Î¿î µ¥ÀÌÅ͸¦ ¼Û½ÅÇÒ ¼ö ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù.

#define uip_close  ) 
 

Close the current connection.

ÇöÀç ¿¬°áÀ» ´ÝÀ½.


This function will close the current connection in a nice way.

ÀÌ ÇÔ¼ö´Â ÇöÀç ¿¬°áÀ» ´Ý´Â´Ù.

#define uip_closed  ) 
 

Has the connection been closed by the other end?

¿¬°áÀÌ ´Ù¸¥ ³ëµå¿¡ ÀÇÇØ ´ÝÇû´Â°¡?


Is non-zero if the connection has been closed by the remote host. The application may then do the necessary clean-ups.

¿¬°áÀÌ ¿ø°ÝÁö È£½ºÆ®¿¡ÀÇÇØ ´ÝÇû´Ù¸é 0ÀÌ¾Æ´Ñ °ªÀ» ¸®ÅÏ, ¾îÇø®ÄÉÀ̼ÇÀÌ ÇÊ¿äÇÑ Á¦°Å¸¦ ÇØ¾ß ÇÑ´Ù.

#define uip_connected  ) 
 

Has the connection just been connected?

Á¢¼ÓÀÌ ¿¬°á µÇ¾ú´Â°¡?


Reduces to non-zero if the current connection has been connected to a remote host. This will happen both if the connection has been actively opened (with uip_connect()) or passively opened (with uip_listen()).

ÇöÀç Á¢¼ÓÀÌ ¿ø°ÝÁö È£½ºÆ®¿¡ ¿¬°áµÇ¾úÀ¸¸é 0ÀÌ¾Æ´Ñ °ªÀ» ¸®ÅÏ. À̰ÍÀº ¿¬°áÀÌ uip_connect()À» ÀÌ¿ëÇÏ¿© ¿­¸®°Å³ª uip_listen()À¸·Î ¿­¸®¸é ÀϾ´Ù.

#define uip_datalen  ) 
 

The length of any incoming data that is currently avaliable (if avaliable) in the uip_appdata buffer.

uip_appdata ¹öÆÛ¿¡¼­ ÇöÀç À¯È¿ÇÑ ÀԷµ¥ÀÌÅÍÀÇ ±æÀÌ.


The test function uip_data() must first be used to check if there is any data available at all.

Å×½ºÆ® ÇÔ¼ö uip_data()´Â À¯È¿ÇÑ µ¥ÀÌÅͰ¡ ÀÖ´Â Áö ¾ø´ÂÁö °Ë»çÇÏ´Â µ¥ »ç¿ëµÇ¾î¾ß ÇÑ´Ù.

#define uip_mss  ) 
 

Get the current maxium segment size that can be sent on the current connection.

ÇöÀç ¿¬°á¿¡¼­ ¼Û½ÅµÉ ¼ö ÀÖ´Â ÃÖ´ë ¼¼±×¸ÕÆ® »çÀÌÁ ¾òÀ½.


The current maxiumum segment size that can be sent on the connection is computed from the receiver's window and the MSS of the connection (which also is available by calling uip_initialmss()).

¿¬°á»óÅ¿¡¼­ ¼Û½ÅµÇ¾îÁú ÇöÀç ÃÖ´ë ¼¼±×¸ÕÆ® »çÀÌÁî´Â ¼ö½Å À©µµ¿ì¿Í ¿¬°á MSS·ÎºÎÅÍ °è»êµÈ´Ù.

#define uip_newdata  ) 
 

Is new incoming data available?

»õ·Î ÀÔ·ÂµÈ µ¥ÀÌÅͰ¡ À¯È¿ÇѰ¡?


Will reduce to non-zero if there is new data for the application present at the uip_appdata pointer. The size of the data is avaliable through the uip_len variable.

uip_appdata Æ÷ÀÎÅͰ¡ °¡¸®Å°°íÀÖ´Â °÷¿¡ ¾îÇø®ÄÉÀ̼ÇÀ» À§ÇÑ »õ·Î¿î µ¥ÀÌÅͰ¡ ÀÖÀ¸ ¸é 0ÀÌ ¾Æ´Ñ °ªÀ» ¸®ÅÏÇÑ´Ù. µ¥ÀÌÅÍ »çÀÌÁî´Â uip_len º¯¼ö¸¦ ÅëÇØ À¯È¿ÇÏ´Ù.

#define uip_poll  ) 
 

Is the connection being polled by uIP?

¿¬°áÀÌ uIP¿¡ ÀÇÇØ Æú¸µµÇ°í Àִ°¡?


Is non-zero if the reason the application is invoked is that the current connection has been idle for a while and should be polled.

The polling event can be used for sending data without having to wait for the remote host to send data.

¾îÇø®ÄÉÀ̼ÇÀÌ È£ÃâµÈ ÀÌÀ¯°¡ ÇöÀç ¿¬°áÀÌ Àá½Ã ¾ÆÀÌµé »óÅ¿´´Ù¸é 0ÀÌ¾Æ´Ñ °ªÀ» ¸® ÅÏÇÑ´Ù. Æú¸µ À̺¥Æ®´Â µ¥ÀÌÅ͸¦ ¼Û½ÅÇÒ ¿ø°ÝÁö È£½ºÆ®¸¦ ±â´Ù¸± ÇÊ¿ä ¾øÀÌ ¼Û½Åµ¥ÀÌÅ͸¦ À§ÇØ »ç¿ëµÉ ¼ö ÀÖ´Ù.

#define uip_restart  ) 
 

Restart the current connection, if is has previously been stopped with uip_stop().

uip_stop()À¸·Î Àü¿¡ Á¤Áö µÇ¾ú´Ù¸é ÇöÀç ¿¬°áÀ» Àç ½ÃÀÛ


This function will open the receiver's window again so that we start receiving data for the current connection.

ÀÌ ÇÔ¼ö´Â ¼ö½Å À©µµ¿ì¸¦ ´Ù½Ã ¿ÀÇÂÇÏ°í µ¥ÀÌÅ͸¦ ¼ö½Å ÇÒ °ÍÀÌ´Ù.

#define uip_rexmit  ) 
 

Do we need to retransmit previously data?

Àü µ¥ÀÌÅ͸¦ ÀçÀü¼Û ÇÒ Çʿ䰡 Àִ°¡?


Reduces to non-zero if the previously sent data has been lost in the network, and the application should retransmit it. The application should send the exact same data as it did the last time, using the uip_send() function.

ÀÌÀü¿¡ ¼Û½ÅÇÑ µ¥ÀÌÅͰ¡ ³×Æ®¿÷¿¡¼­ ¼Õ½ÇµÇ¾î¼­ ¾îÇø®ÄÉÀ̼ÇÀÌ ÀçÀü¼ÛÀ» Çϸé 0ÀÌ¾Æ´Ñ °ªÀ» ¸®ÅÏÇÑ´Ù. ¾îÇø®ÄÉÀ̼ÇÀº uip_send()¸¦ »ç¿ëÇØ¼­ ¸¶Áö¸·À¸·Î ¼Û½ÅÇß´ø °Í ó·³ ¶È°°ÀÌ ¼Û½ÅÇÑ´Ù.

#define uip_send data,
len   ) 
 

Send data on the current connection.

µ¥ÀÌÅ͸¦ ÇöÀç ¿¬°á¿¡ ¼Û½Å.


This function is used to send out a single segment of TCP data. Only applications that have been invoked by uIP for event processing can send data.

ÀÌ ÇÔ¼ö´Â TCP µ¥ÀÌÅÍÀÇ ´ÜÀÏ ¼¼±×¸ÕÆ®¸¦ ¼Û½ÅÇÏ´Â µ¥ »ç¿ëµÈ´Ù. À̺¥Æ® 󸮿¡ ´ëÇØ uIP¿¡ ÀÇÇØ È£ÃâµÈ ¾îÇø®ÄÉÀ̼ÇÀº µ¥ÀÌÅ͸¦ ¼Û½ÅÇÒ ¼ö ÀÖ´Ù.


The amount of data that actually is sent out after a call to this funcion is determined by the maximum amount of data TCP allows. uIP will automatically crop the data so that only the appropriate amount of data is sent. The function uip_mss() can be used to query uIP for the amount of data that actually will be sent.

ÀÌ ÇÔ¼ö¸¦ È£ÃâÇÑ ÈÄ ÀÚµ¿À¸·Î ¼Û½ÅµÈ µ¥ÀÌÅÍÀÇ ¾çÀº TCP°¡ Çã¿ëÇÏ´Â ÃÖ´ë µ¥ÀÌÅÍ ¾ç¿¡ ÀÇÇØ °áÁ¤µÈ´Ù. uIP´Â ÀÚµ¿À¸·Î µ¥ÀÌÅ͸¦ Àß¶ó¼­ Àû´çÇÑ µ¥ÀÌÅÍÀÇ ¾çÀÌ ¼Û½ÅµÈ´Ù. ÇÔ¼öuip_mss()´Â ½ÇÁ¦·Î ¼Û½ÅµÈ µ¥ÀÌÅÍÀÇ ¾çÀ» uIP¿¡ ¹°À» ¶§ »ç¿ëµÈ´Ù.


Note:
This function does not guarantee that the sent data will arrive at the destination. If the data is lost in the network, the application will be invoked with the uip_rexmit() event being set. The application will then have to resend the data using this function.

ÀÌ ÇÔ¼ö´Â ¼Û½ÅµÈ µ¥ÀÌÅͰ¡ ¸ñÀûÁö¿¡ µµÂøÇß´ÂÁö¿¡ ´ëÇØ º¸ÀåÇÏÁö´Â ¾Ê´Â´Ù. µ¥ÀÌÅͰ¡ ³×Æ®¿÷»ó¿¡¼­ ¼Õ½ÇµÇ¾ú´Ù¸é, ¾îÇø®ÄÉÀ̼ÇÀº ¼³Á¤µÈ À̺¥Æ® ÇÔ¼öÀÎ uip_rexmit()·Î È£ÃâµÉ °ÍÀÌ´Ù. ±×·±´ÙÀ½ ¾îÇø®ÄÉÀ̼ÇÀº ÀÌ ÇÔ¼ö¸¦ ÀÌ¿ëÇØ¼­ µ¥ÀÌÅ͸¦ ÀçÀü¼ÛÀ» ÇØ¾ß ÇÑ´Ù.
Parameters:
data A pointer to the data which is to be sent.
¼Û½ÅµÉ µ¥ÀÌÅÍÀÇ Æ÷ÀÎÅÍ.
len The maximum amount of data bytes to be sent.
¼Û½ÅµÉ µ¥ÀÌÅÍÀÇ ÃÖ´ë ¹ÙÀÌÆ®.

#define uip_stop  ) 
 

Tell the sending host to stop sending data.

¼Û½Å È£½ºÆ®¿¡°Ô µ¥ÀÌÅÍ ¼Û½ÅÀ» ÁßÁöÇÔÀ» ¾Ë¸².


This function will close our receiver's window so that we stop receiving data for the current connection.

ÀÌ ÇÔ¼ö´Â ¼ö½Å À©µµ¿ì¸¦ ´Ý¾Æ¼­ ÇöÀç ¿¬°á¿¡¼­ µ¥ÀÌÅÍ ¼ö½ÅÇÏ´Â °ÍÀ» ÁßÁöÇÑ´Ù.

#define uip_timedout  ) 
 

Has the connection timed out?

¿¬°áÀÌ Å¸ÀÓ ¾Æ¿ô µÇ¾ú´Â°¡?


Non-zero if the current connection has been aborted due to too many retransmissions.

³Ê¹« ¸¹Àº ÀçÀü¼Û ¶§¹®¿¡ ¿¬°áÀÌ Á¤ÁöµÆ´Ù¸é 0ÀÌ ¾Æ´Ñ °ª ¸®ÅÏ.

#define uip_udp_remove conn   ) 
 

Removed a UDP connection.

UDP ¿¬°áÀ» Á¦°Å.


Parameters:
conn A pointer to the uip_udp_conn structure for the connection.
¿¬°á ±¸Á¶Ã¼ uip_udp_connÀÇ Æ÷ÀÎÅÍ.

#define uip_udp_send len   ) 
 

Send a UDP datagram of length len on the current connection.

ÇöÀç ¿¬°á¿¡¼­ len±æÀÌ ¸¸Å­ÀÇ UDP µ¥ÀÌÅͱ׷¥À» ¼Û½Å.


This function can only be called in response to a UDP event (poll or newdata). The data must be present in the uip_buf buffer, at the place pointed to by the uip_appdata pointer.

ÀÌ ÇÔ¼ö´Â UDP À̺¥Æ® ÀÀ´äÀ¸·Î È£ÃâµÈ´Ù. µ¥ÀÌÅÍ´Â uip_appdata Æ÷ÀÎÅͰ¡ °¡¸®Å°´Â uip_buffer¿¡ Á¸Àç ÇØ¾ß ÇÑ´Ù.


Parameters:
len The length of the data in the uip_buf buffer.
¹öÆÛ uip_buf¿¡ µ¥ÀÌÅÍ ±æÀÌ.

#define uip_urgdatalen  ) 
 

The length of any out-of-band data (urgent data) that has arrived on the connection.

¼ö½ÅµÈ µ¥ÀÌÅÍÁß ¹êµå¸¦ ¹þ¾î³­ µ¥ÀÌÅÍÀÇ ±æÀÌ.


Note:
The configuration parameter UIP_URGDATA must be set for this function to be enabled.

±¸¼º ÆÄ¶ó¸ÞÅÍÀÎ UIP_URGDATA´Â ÀÌ ÇÔ¼ö°¡ Ȱ¼ºÈ­ µÉ ¶§ ¼³Á¤µÇ¾î¾ß ÇÑ´Ù.


Function Documentation

struct uip_conn* uip_connect u16_t ripaddr,
u16_t  port
 

Connect to a remote host using TCP.

TCP¸¦ »ç¿ëÇØ¼­ ¿ø°ÝÁö È£½ºÆ®¿Í ¿¬°á.


This function is used to start a new connection to the specified port on the specied host. It allocates a new connection identifier, sets the connection to the SYN_SENT state and sets the retransmission timer to 0. This will cause a TCP SYN segment to be sent out the next time this connection is periodically processed, which usually is done within 0.5 seconds after the call to uip_connect().

ÀÌ ÇÔ¼ö´Â ÁöÁ¤µÈ È£½ºÆ®ÀÇ ÁöÁ¤µÈ Æ÷Æ®¿¡ »õ·Î¿î ¿¬°áÀ» ½ÃÀÛÇÏ´Â µ¥ »ç¿ëµÈ´Ù. »õ·Î¿î ¿¬°á id¸¦ ÇÒ´çÇÏ°í ¿¬°áÀ» SYN_SENT »óÅ·Π¼³Á¤Çϰí ÀçÀü¼Û ŸÀ̸Ӹ¦ 0À¸·Î ¼³Á¤ÇÑ´Ù. À̰ÍÀº TCP SYN ¼¼±×¸ÕÆ®°¡ ´ÙÀ½ ¹ø¿¡ ¼Û½ÅµÇµµ·Ï ÇÒ°ÍÀ̰í ÀÌ¿¬°áÀº ÁÖ±âÀûÀ¸·Î 󸮵ȴÙ. uip_connect()°¡ È£ÃâµÇ°í º¸Åë 0.5ÃÊ À̳» 󸮵ȴÙ.


Note:
This function is avaliable only if support for active open has been configured by defining UIP_ACTIVE_OPEN to 1 in uipopt.h.

ÀÌ ÇÔ¼ö´Â ¾×Ƽºê ¿ÀÇ Áö¿øÀÌ UIP_ACTIVE_OPENÀ» 1·Î ¼³Á¤Çϸé À¯È¿ÇÏ´Ù.


Since this function requires the port number to be in network byte order, a convertion using HTONS() or htons() is necessary.

ÀÌÇÔ¼ö´Â ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­·ÎµÈ Æ÷Æ® ¹øÈ£¸¦ ¿ä±¸Çϱ⠶§¹®¿¡ HTONS()³ª htons()¸¦ »ç¿ëÇØ¼­ º¯È¯ÇÏ´Â °ÍÀÌ ÇÊ¿äÇÏ´Ù.

 u16_t ipaddr[2];

 uip_ipaddr(ipaddr, 192,168,1,2);
 uip_connect(ipaddr, HTONS(80)); 

Parameters:
ripaddr A pointer to a 4-byte array representing the IP address of the remote hot.
¿ø°ÝÁö È£½ºÆ®ÀÇ IPÁÖ¼Ò¸¦ ³ªÅ¸³»´Â 4-¹ÙÀÌÆ® ¹è¿­ Æ÷ÀÎÅÍ.
port A 16-bit port number in network byte order.
³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ÀÇ 16ºñÆ® Æ÷Æ® ¹øÈ£
Returns:
A pointer to the uIP connection identifier for the new connection, or NULL if no connection could be allocated.

»õ·Î¿î ¿¬°áÀ» À§ÇÑ uIP ¿¬°á id Æ÷ÀÎÅÍ, ¿¬°áÀÌ ÇÒ´ç µÇÁö ¾ÊÀ¸¸é NULL

void uip_listen u16_t  port  ) 
 

Start listening to the specified port.

ÁöÁ¤µÈ Æ÷Æ®¿¡¼­ ¸®½¼(listening)À» ½ÃÀÛ.


Note:
Since this function expects the port number in network byte order, a conversion using HTONS() or htons() is necessary.

ÀÌ ÇÔ¼ö´Â ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ÀÇ Æ÷Æ® ¹øÈ£¸¦ ¿¹»óÇϱ⠶§¹®¿¡ HTONS()³ª htons()¸¦ »ç¿ëÇØ¼­ º¯È¯ÇÏ´Â °ÍÀÌ ÇÊ¿äÇÏ´Ù.

Parameters:
port A 16-bit port number in network byte order.

³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ÀÇ 16ºñÆ® Æ÷Æ® ¹øÈ£.

struct uip_udp_conn* uip_udp_new u16_t ripaddr,
u16_t  rport
 

Set up a new UDP connection.

»õ·Î¿î UDP ¿¬°áÀ» ¼³Á¤.


Parameters:
ripaddr A pointer to a 4-byte structure representing the IP address of the remote host.
¿ø°ÝÁö È£½ºÆ®ÀÇ ipÁÖ¼Ò¸¦ ³ªÅ¸³»´Â 4-¹ÙÀÌÆ® ±¸Á¶Ã¼ Æ÷ÀÎÅÍ.
rport The remote port number in network byte order.
³×Æ®¿÷ ¹ÙÀÌÆ®¼ø¼­ÀÇ ¿ø°ÝÁö Æ÷Æ® ¹øÈ£.
Returns:
The uip_udp_conn structure for the new connection or NULL if no connection could be allocated.

»õ·Î¿î ¿¬°á¿¡ ´ëÇÑ uip_udp_conn ±¸Á¶Ã¼, ¿¬°áÀÌ ÇÒ´çµÇÁö ¾ÊÀ¸¸é NULL

void uip_unlisten u16_t port  ) 
 

Stop listening to the specified port.

ÁöÁ¤µÈ Æ÷Æ®ÀÇ ¸®½¼(listen)À» ÁßÁö.


Note:
Since this function expects the port number in network byte order, a conversion using HTONS() or htons() is necessary.

ÀÌ ÇÔ¼ö´Â ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ÀÇ Æ÷Æ® ¹øÈ£¸¦ ¿¹»óÇϱ⠶§¹®¿¡ HTONS()³ª htons()¸¦ »ç¿ëÇØ¼­ º¯È¯ÇÏ´Â °ÍÀÌ ÇÊ¿äÇÏ´Ù.

Parameters:
port A 16-bit port number in network byte order.
³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­ÀÇ 16-ºñÆ® Æ÷Æ®¹øÈ£


Generated on Tue Oct 7 15:51:43 2003 for uIP 0.9 by doxygen 1.3.3