Definitions

Socket Error Codes

Socket Error Codes, read with socket_struct ->error_code

See also
socket_struct
#define SO_NO_ERROR   0x00000000 /* no error */
 
#define SO_TRANSMIT_ERROR   0x00000001 /* Transmit error */
 
#define SO_NO_ARP_ADDRESS   0x00000002 /* Unresolved destination MAC */
 
#define SO_TIMED_OUT   0x00000003 /* transfer function timed out */
 
#define SO_IN_USE   0x00000004 /* TCP only: not ready */
 
#define SO_NOT_ESTABLISHED   0x00000005 /* TCP only: not connected */
 
#define SO_CONNECTION_RESET   0x00000006 /* TCP only: connection reset by remote host */
 
#define SO_WRONG_CHECKSUM   0x00000007 /* net_recv():: data checksum failed */
 
#define SO_BUFFER_TOO_SMALL   0x00000008 /* net_recv():: data > maxdatalen received */
 
#define SO_NO_INPUT_BUFFER   0x00000009 /* net_recv():: NULL pointer given as data buffer */
 
#define SO_NOT_OPEN   0x0000000a /* Socket is not open */
 
#define SO_CONNECTION_CLOSED   0x0000000c /* TCP only: connection closed */
 
#define SO_WINDOW_ERR   0x0000000d /* TCP only: window size zero received */
 
#define SO_CONNECTION_ESTABLISHED   0x0000000e /* TCP only: connected */
 
#define SO_MMU_ERROR   0x0000000f /* SMCS91c111: MMU error */
 
#define SO_SEND_PENDING   0x00000010 /* Send pending */
 
#define SO_NO_LINK   0x00000011 /* No valid link */
 
#define SO_DNS_ERR   0x00000012 /* Name resolution missing or pending */
 
#define SO_NO_TCP_MEM   0x00000013 /* TCP out of memory */
 
#define SO_ERROR_MASK   0x7fffffff /* socket error mask */
 

Socket data and protocol types

Use with socket_open()

#define DATATYPE_CHAR   0x1
 
#define DATATYPE_SHORT   0x2
 
#define DATATYPE_INT   0x4
 
#define IPT_TCP
 
#define IPT_UDP
 
#define TCP_INIT_FUNC
 
#define UDP_INIT_FUNC
 
#define ICMP_INIT_FUNC
 

Well known addresses

#define ANY_ADDRESS   "0.0.0.0" /* Any IP address */
 
#define BROADCAST   "255.255.255.255" /* Broadcast IP address */
 

Well known ports

#define ANY_PORT   0
 
#define ECHO_PORT   0x07
 
#define TIME_SERVER_PORT   0x0D
 
#define FTP_DATA_PORT   0x14
 
#define FTP_CONTROL_PORT   0x15
 
#define TELNET_PORT   0x17
 
#define DNS_SERVER_PORT   0x35
 
#define DHCP_SERVER_PORT   0x43
 
#define DHCP_CLIENT_PORT   0x44
 
#define TFTP_SERVER_PORT   0x45
 

Socket Configuration Failure

socket_open() return value in case of insufficient memory or illegal configuration parameters

#define INVALID_SOCKET   NULL
 

Socket Option

Use with set_socket_option()

#define SO_UDP_NO_CHECKSUM   0x00000004 /* UDP w/o checksum */
 
#define SO_TCP_STATE_CLOSED   0x00000008 /* use TCP state closed */
 
#define SO_TCP_NO_RETRANS   0x00000020 /* disable TCP retransmit */
 
#define SO_TCP_NO_FAST_RETRANS   0x00000040 /* disable fast TCP retransmit */
 
#define SO_USE_PROXY   0x00000200 /* use proxy server */
 

Socket Failure

Socket Error, net_recv() and net_send() return code

#define SOCKET_ERROR   (_MAKE_32(-1))
 

Socket callback function return parameter

#define SOCKET_CB_OK   (_MAKE_32(1))
 
#define SOCKET_CB_CLOSED   (_MAKE_32(-1))
 

Detailed Description

Macro Definition Documentation

#define SO_NO_ERROR   0x00000000 /* no error */

Previous operation was successful.

Examples:
PServer.c, and Telnet.c.
#define SO_TRANSMIT_ERROR   0x00000001 /* Transmit error */

Socket Error Code

SO_TRANSMIT_ERROR is a TCP specific error. It may occur under the following conditions

  • net_send() is called while a packet is re-transmitted
  • net_isq() initiates a re-transmit
  • the link is broken during transmit
  • SMSC91c111 controller only: in multitasking systems when two different processes try to access the SMSC91c111
  • SMSC91c111 controller only: the SMSC91c111 runs out of FIFO memory
Note
This error is cleared automatically and must not be reset by user
1 //**************************************************************************
2 // try to send packet
3 //**************************************************************************
4 ret= net_send (socket, data, send_length);
5 if (ret == NET_SEND_PENDING)
6 {
7  //**********************************************************************
8  process net_isq() while SO_TRANSMIT_ERROR is set
9  //**********************************************************************
10  while (( socket-> error_code & SO_ERROR_MASK) == SO_TRANSMIT_ERROR)
11  {
12  net_isq ();
13  }
14 }
#define SO_NO_ARP_ADDRESS   0x00000002 /* Unresolved destination MAC */

Socket Error Code

SO_NO_ARP_ADDRESS occurs when the address resolution failed. If this error is set, any following call to net_send() will fail and initiate a new ARP request.

Affected protocols: ICMP, UDP, TCP

Note
Cleared when address resolved successfully or any other error occurs
1 ret = net_send (udp_socket, // socket
2  udp_data, // data to send
3  10); // length of data
4 if (ret == NET_SEND_PENDING)
5 {
6  if (( udp_socket-> error_code & SO_ERROR_MASK) == SO_NO_ARP_ADDRESS)
7  {
8  // Destination Address not resolved. Packet was passed to the TCP/IP stack
9  // and will be transmitted automatically when address resolution
10  // in background was successful. This happens always with the first packet
11  // to a new destination or when the ARP cache is cleared after a certain time.
12  // Make sure to trigger the net_isq() for address resolution.
13  // Note: don't change data content until this packet was transmitted
14  // by the TCP/IP stack. This constraint exists due to the zero-copy mechanism;
15  // the stack needs to access the data pointer later.
16  // This is also the reason for the globally defined array udp_data[]. If this
17  // buffer would have been defined locally, the data content is invalid after
18  // return from this function, since all local data is stored on the stack
19  } // if
20  if (( udp_socket-> error_code & SO_ERROR_MASK) == ????)
21  {
22  // other error condition
23  }
24 }
Examples:
Send.c.
#define SO_TIMED_OUT   0x00000003 /* transfer function timed out */

Socket Error Code:

See also
tcp_set_keep_alive_time(), net_send_ready(), net_recv_ready(), connect()
Note
This error is cleared automatically by a consecutive SO_CONNECTION_ESTABLISHED after a new connect()

Callback function detects time-out due to 3 unanswered KEEP_ALIVE packets:

1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_TIMED_OUT:
9  //****************************************************************
10  // connection timed out, peer not available
11  // shut-down connection to prevent a dangling socket
12  //****************************************************************
13  shutdown (so, 10);
14  net_print_error (ec, CPrintf);
15  CPrintf (" connection closed\r\n");
16  break;
17  ...
18 
19  }
20 
21  //************************************************************************
22  // return true, if message processed
23  //************************************************************************
24  return (1);
25 }

connect() returns SO_TIMED_OUT due to destination unreachable:

1 //**************************************************************************
2 // try to connect to server
3 // 20 retries
4 // 6000000 time-out
5 //**************************************************************************
6 if ( connect (server, data, 20, 6000000) != TRUE )
7 {
8  //**********************************************************************
9  // connect error
10  //**********************************************************************
11  switch ( socket-> error_code & SO_ERROR_MASK )
12  {
13  case SO_IN_USE: // destination or local port in use
14  break;
15  case SO_DNS_ERR: // address could not be resolved
16  case SO_NO_LINK; // no valid link
17  case SO_TIMED_OUT: // time-out run out
18  default:
19  shutdown(so, 0); // shut-down immediately
20  // do further error handling
21  break;
22  }
23 }
Examples:
Blocksend.c.
#define SO_IN_USE   0x00000004 /* TCP only: not ready */

Socket Error Code:

  • connect() is called while socket is already connected
  • the remote side rejects the connection due to port in use
  • SMSC91c111 controller only: in multitasking systems when two different processes try to access the SMSC91c111
Note
Cleared by other errors
1 ret = connect (socket, so_data, retries, timeout);
2 switch ( ret )
3 {
4  case SO_DNS_ERR: // address could not be resolved
5  case SO_NO_LINK: // no valid link
6  case SO_TIMED_OUT: // time-out run out
7  case SO_NOT_ESTABLISHED: // if parameter time-out was 0
8  break;
9  case SO_IN_USE:
10  // destination or local port in use
11  break;
12 }
#define SO_NOT_ESTABLISHED   0x00000005 /* TCP only: not connected */

Socket Error Code:
TCP only:

Note
This error is cleared automatically and must not be reset by user
See also
connect(), net_send(), net_send_ready()
1 //**************************************************************************
2 // try to send packet
3 //**************************************************************************
4 ret= net_send (socket, data, send_length);
5 if (ret == NET_SEND_PENDING)
6 {
7  if (( socket-> error_code & SO_ERROR_MASK) == SO_NOT_ESTABLISHED)
8  {
9  //******************************************************************
10  // peer disconnected, don't send further packets until re-connect
11  // return immediately
12  //******************************************************************
13  net_print_error (socket-> error_code, CPrintf);
14  shutdown (socket, 0);
15  return;
16  }
17  if (( socket-> error_code & SO_ERROR_MASK) == ????)
18  {
19  // other error condition
20  }
21 }
#define SO_CONNECTION_RESET   0x00000006 /* TCP only: connection reset by remote host */

Socket Error Code:
TCP only:
This error occurs any time a TCP_RST is received. The TCP state machine is reset and all data is flushed. Use a re-connect before sending new data.

Note
This error is automatically reset when a callback function is used or by a consecutive SO_CONNECTION_ESTABLISHED after a new connect()
1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_CONNECTION_RESET:
9  //****************************************************************
10  // connection was reset by the remote side.
11  // use re-connect before sending new data
12  //****************************************************************
13  net_print_error (ec, CPrintf);
14  break;
15  ...
16 
17  }
18 
19  //************************************************************************
20  // return true, if message processed
21  //************************************************************************
22  return (1);
23 }
Examples:
PServer.c.
#define SO_WRONG_CHECKSUM   0x00000007 /* net_recv():: data checksum failed */

Socket Error Code:
Affected protocols: ICMP, UDP and TCP
This error is set any time the checksum function determines a checksum error. Possibly data is overwritten by another task or by DMA. Ensure the data is not overwritten until it was processed.

In seldom cases this error was caused by a defective RAM chip.

Note
This error is only valid for one received packet and may be overwritten by any succeeding error.
1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_WRONG_CHECKSUM:
9  //****************************************************************
10  // a checksum error was detected
11  //****************************************************************
12  net_print_error (ec, CPrintf);
13  break;
14  ...
15 
16  }
17 
18  //************************************************************************
19  // return true, if message processed
20  //************************************************************************
21  return (1);
22 }
#define SO_BUFFER_TOO_SMALL   0x00000008 /* net_recv():: data > maxdatalen received */

Socket Error Code:
Affected protocols: ICMP, UDP and TCP
Is set in net_isq() when a data packet is larger than the user defined buffer

Note
This error is cleared automatically
1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_BUFFER_TOO_SMALL:
9  //****************************************************************
10  // insufficient buffer space, please increase data buffer spcae
11  //****************************************************************
12  net_print_error (ec, CPrintf);
13  break;
14  ...
15 
16  }
17 
18  //************************************************************************
19  // return true, if message processed
20  //************************************************************************
21  return (1);
22 }
#define SO_NO_INPUT_BUFFER   0x00000009 /* net_recv():: NULL pointer given as data buffer */

Socket Error Code:
Is set in net_isq() when the user defined buffer is equal to NULL. This usually happens, when no callback function was defined and the net_recv() task was blocked and never be executed while an incoming packet has to be written to a user buffer.

Note
Cleared by other errors
1 //**************************************************************************
2 // create UDP echo socket
3 //**************************************************************************
4 udp_echo = socket_open (ANY_ADDRESS,
5  ANY_PORT,
6  ECHO_PORT,
7  DATATYPE_CHAR,
8  UDP_INIT_FUNC);
9 
10 for(;;)
11 {
12  net_isq();
13 
14 // net_recv(udp_echo, data, 1000); <- commented out
15 
16  if ((udp_echo->error_code & SO_ERROR_MASK) == SO_NO_INPUT_BUFFER)
17  {
18  CPrintf("No input buffer");
19  }
20 }

In this example the net_recv() function was accidentally commented out. Any incoming packet on this socket will cause the net_isq() to set the error code SO_NO_INPUT_BUFFER.

#define SO_NOT_OPEN   0x0000000a /* Socket is not open */

Socket Error Code:
net_recv() or net_send() return a SOCKET_ERROR SO_NOT_OPEN when the socket was previously closed. This may happen on operating systems when a receive task closes a socket while a transmit task processes a net_send().

Warning
If a socket is closed, all associated memory is freed. Thus the socket pointer is invalid and should not be used.
#define SO_CONNECTION_CLOSED   0x0000000c /* TCP only: connection closed */

Socket Error Code:
TCP only:
This flag is set, when either the remote side or the user is shutting down the connection

Note
Automatically reset when a callback function is used or by a consecutive SO_CONNECTION_ESTABLISHED after a new connect()
1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_CONNECTION_CLOSED:
9  //****************************************************************
10  // connection closed
11  //****************************************************************
12  net_print_error (ec, CPrintf);
13  break;
14  ...
15 
16  }
17 
18  //************************************************************************
19  // return true, if message processed
20  //************************************************************************
21  return (1);
22 }
Examples:
PServer.c.
#define SO_WINDOW_ERR   0x0000000d /* TCP only: window size zero received */

Socket Error Code:
Set in net_isq() or net_send() when

  • the remote side sends a zero window packet
  • the remote side is running out of buffer and the next data to be sent would cause a buffer overrun
Note
This error is cleared automatically and must not be reset by user
1 net_send_return = net_send (socket, bptr, send_length);
2 if ( net_send_return == NET_SEND_PENDING )
3 {
4  //**********************************************************************
5  // the data could not be transmitted immediately
6  // check error code, mask out MSB (event flag)
7  //**********************************************************************
8  while (( socket-> error_code & SO_ERROR_MASK ) == SO_WINDOW_ERR)
9  {
10  net_isq(); // process net_isq() while SO_WINDOW_ERR
11  }
12 }
#define SO_CONNECTION_ESTABLISHED   0x0000000e /* TCP only: connected */

Socket Error Code:
TCP only: Set in net_isq() after successful three-way-handshake

Note
Automatically reset when a callback function is used or by consecutive other errors
1 int32_t tcp_echo (SOCKET *so, void *data, uint32_t len, uint32_t ec)
2 {
3  switch (ec)
4  {
5  case ...
6  break;
7 
8  case SO_CONNECTION_ESTABLISHED:
9  //****************************************************************
10  // new connection established
11  //****************************************************************
12  net_print_error (ec, CPrintf);
13  break;
14  ...
15 
16  }
17 
18  //************************************************************************
19  // return true, if message processed
20  //************************************************************************
21  return (1);
22 }
Examples:
PServer.c.
#define SO_MMU_ERROR   0x0000000f /* SMCS91c111: MMU error */

Socket Error Code:
SMSC91C111 only: Possible race condition of SMSC91c111. If the SMSC91c111 allocation interrupt signals a free buffer and a buffer overrun interrupt occurs before the buffer is used, the buffer may be lost.

#define SO_SEND_PENDING   0x00000010 /* Send pending */

Socket Error Code:

  • Is set in multitasking systems when two different write processes try to send over one socket.
  • Is set when the user tries to send a packet while a background process starts a re-transmit or a TCP flow control packet
  • EMAC only: internal EMAC RAM is full
Note
This error is cleared automatically and must not be reset by user
1 net_send_return = net_send (socket, bptr, send_length);
2 if ( net_send_return == NET_SEND_PENDING )
3 {
4  //**********************************************************************
5  // the data could not be transmitted immediately
6  // check error code, mask out MSB (event flag)
7  //**********************************************************************
8  while (( socket-> error_code & SO_ERROR_MASK ) == SO_SEND_PENDING)
9  {
10  net_isq(); // process net_isq() while SO_SEND_PENDING
11  }
12 }
#define SO_NO_LINK   0x00000011 /* No valid link */

Socket Error Code:
Is set, when the link is broken during transmit.

Warning
This error MUST not be reset by user!
1 net_send_return = net_send (socket, bptr, send_length);
2 if ( net_send_return == NET_SEND_PENDING )
3 {
4  //**********************************************************************
5  // the data could not be transmitted immediately
6  // check error code, mask out MSB (event flag)
7  //**********************************************************************
8  if (( socket-> error_code & SO_ERROR_MASK ) == SO_NO_LINK)
9  {
10  //******************************************************************
11  // link is down, return immediately
12  //******************************************************************
13  net_print_error (socket-> error_code, CPrintf);
14  shutdown (socket, 0);
15  return (0);
16  }
17  if (( udp_socket-> error_code & SO_ERROR_MASK) == ????)
18  {
19  // other error condition
20  }
21 }
#define SO_DNS_ERR   0x00000012 /* Name resolution missing or pending */

Socket Error Code:
TCP only: Name resolution missing or pending.

If the destination host name was specified and not a certain IP address, the TCP/IP stack tries to resolve the address during connect(). If the address resolution failed, error code SO_DNS_ERR is set.

Warning
This error MUST not be reset by user!
1 //**************************************************************************
2 // try to connect to server
3 // 20 retries
4 // 6000000 time out
5 //**************************************************************************
6 if ( connect (server, data, 20, 6000000) != TRUE )
7 {
8  //**********************************************************************
9  // connect error
10  //**********************************************************************
11  switch ( socket-> error_code & SO_ERROR_MASK )
12  {
13  case SO_IN_USE: // destination or local port in use
14  break;
15  case SO_DNS_ERR: // address could not be resolved
16  case SO_NO_LINK; // no valid link
17  case SO_TIMED_OUT: // time out run out
18  default:
19  shutdown(so, 0); // shut down immediately
20  // do further error handling
21  break;
22  }
23 }
#define SO_NO_TCP_MEM   0x00000013 /* TCP out of memory */

Socket Error Code:
TCP out of memory

Note
This error is cleared automatically when space for new sequence numbers is available
1 for (i=0; i<1000; i++)
2 {
3  net_send(so, data, 10);
4 }

No net_isq() is handled in the example above. Any time net_send() is called new TCP sequence numbers are occupied and due to the missing net_isq() call never be freed. The TCP sequence number memory will run full and the error code SO_NO_TCP_MEM will be set.

#define SO_ERROR_MASK   0x7fffffff /* socket error mask */

Use SO_ERROR_MASK to mask the error event flag

1 //**************************************************************************
2 // try to connect to server
3 // 20 retries
4 // 6000000 timeout
5 //**************************************************************************
6 if ( connect (server, data, 20, 6000000) != TRUE )
7 {
8  //**********************************************************************
9  // connect error
10  //**********************************************************************
11  switch ( socket-> error_code & SO_ERROR_MASK )
12  {
13  case SO_IN_USE: // destination or local port in use
14  break;
15  case SO_DNS_ERR: // address could not be resolved
16  case SO_NO_LINK; // no valid link
17  case SO_TIMED_OUT: // time-out run out
18  default:
19  shutdown(so, 0); // shut down immediately
20  // do further error handling
21  break;
22  }
23 }
Examples:
Blocksend.c, and Send.c.
#define DATATYPE_CHAR   0x1

socket_open() Parameter: Data type character

Examples:
Blocksend.c, Chat.c, Echo.c, Multicast.c, NetTest.c, Send.c, and SMTP.c.
#define DATATYPE_SHORT   0x2

socket_open() Parameter: Data type short

#define DATATYPE_INT   0x4

socket_open() Parameter: Data type int

#define IPT_TCP

socket_open() Parameter: Protocol type TCP

#define IPT_UDP

socket_open() Parameter: Protocol type UDP

#define TCP_INIT_FUNC

socket_open() Parameter: TCP initialization handler

Examples:
Blocksend.c, Echo.c, NetTest.c, and SMTP.c.
#define UDP_INIT_FUNC

socket_open() Parameter: UDP initialization handler

Examples:
Chat.c, Multicast.c, NetTest.c, Receive.c, and Send.c.
#define ICMP_INIT_FUNC

socket_open() Parameter: ICMP initialization handler

#define ANY_ADDRESS   "0.0.0.0" /* Any IP address */

socket_open() Parameter:
This socket accepts connections from any IP

Examples:
Blocksend.c, Chat.c, Echo.c, Multicast.c, NetTest.c, and Receive.c.
#define BROADCAST   "255.255.255.255" /* Broadcast IP address */

socket_open() Parameter:
Broadcast IP address

#define ANY_PORT   0

socket_open() Parameter

Used for servers

Examples:
Blocksend.c, Echo.c, Multicast.c, NetTest.c, Receive.c, and SMTP.c.
#define ECHO_PORT   0x07

socket_open() Parameter

Echo port

Examples:
NetTest.c.
#define TIME_SERVER_PORT   0x0D

socket_open() Parameter

Time server port

#define FTP_DATA_PORT   0x14

FTP data port

#define FTP_CONTROL_PORT   0x15

FTP control port

#define TELNET_PORT   0x17

socket_open() Parameter

FTP telnet port

#define DNS_SERVER_PORT   0x35

socket_open() Parameter

DNS server port

#define DHCP_SERVER_PORT   0x43

socket_open() Parameter

DHCP server port

#define DHCP_CLIENT_PORT   0x44

socket_open() Parameter

DHCP client port

#define TFTP_SERVER_PORT   0x45

socket_open() Parameter

TFTP server port

#define INVALID_SOCKET   NULL

Use INVLAID_SOCKET to test socket_open() function for failure.

1 //**************************************************************************
2 // open socket
3 //**************************************************************************
4 udp_socket = socket_open (ANY_ADDRESS, // any pc address
5  ANY_PORT, // destination port
6  TIME_SERVER_PORT, // source port
7  DATATYPE_CHAR, // data type char
8  UDP_INIT_FUNC); // UDP protocol
9 if ( udp_socket == INVALID_SOCKET )
10 {
11  prg_exit ("socket_open() failed");
12 } // if
Examples:
Blocksend.c, Chat.c, Echo.c, Multicast.c, NetTest.c, PServer.c, Receive.c, Send.c, and SMTP.c.
#define SO_UDP_NO_CHECKSUM   0x00000004 /* UDP w/o checksum */

set_socket_option() Parameter:
Use this parameter to switch off and ignore the UDP checksum. Useful, to accelerate processing speed.

#define SO_TCP_STATE_CLOSED   0x00000008 /* use TCP state closed */

set_socket_option() Parameter:
The default TCP state of opened sockets in the D.SignT TCP/IP stack is the listening state (TCP_LISTEN). In some cases (e.g. for a concurrent HTTP web server) this leads to connection problems. A shortly closed TCP socket may be wrongly established again immediately. To prevent this behaviour use this socket option. This adds two additional TCP states (TCP_CLOSED and TCPS_FIN_WAIT_2) to the TCP state machine. Function tcp_listen() is used to switch the socket state from TCP_CLOSED to TCP_LISTEN. After shutting down a connection the TCP state is TCPS_FIN_WAIT_2 for a certain time and then again TCP_CLOSED.

#define SO_TCP_NO_RETRANS   0x00000020 /* disable TCP retransmit */

set_socket_option() Parameter:
Disable TCP retransmits.

#define SO_TCP_NO_FAST_RETRANS   0x00000040 /* disable fast TCP retransmit */

set_socket_option() Parameter:
When the remote side is configured for delayed ACK, a single TCP packet may take a long time to be acknowledged. To force a fast acknowledge, the D.SignT TCP/IP Stack uses "fast retransmits" as default. Use SO_TCP_NO_FAST_RETRANS to disable this behaviour.

#define SO_USE_PROXY   0x00000200 /* use proxy server */

set_socket_option() Parameter:
The gateway configured with net_set_gateway() is used as proxy-server.

#define SOCKET_ERROR   (_MAKE_32(-1))
#define SOCKET_CB_OK   (_MAKE_32(1))

normal return code

Examples:
Blocksend.c, Echo.c, Multicast.c, NetTest.c, PServer.c, and Receive.c.
#define SOCKET_CB_CLOSED   (_MAKE_32(-1))

return code, if socket was closed

Examples:
PServer.c.