Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

A TCP/IP Socket Location Server


September 2000/A TCP/IP Socket Location Server/Listing 4

Listing 4: Socloc send and receive codes

// file socloc.h

#include "comcode.h"

#define SL_OK SOCKET_RC_OK
#define SL_VC_ERROR SOCKET_RC_VC_ERROR
#define SL_ACCESS_DENIED 1
#define SL_MEMORY_FAIL 2
#define SL_INVALID_FUNCTION 3
#define SL_INTERNAL_ERROR 4
#define SL_NOT_FOUND 5
#define SL_INVALID_PARAMETER 6
#define SL_PORT_EXIST 7
#define SL_NO_SUCH_SOCLOC 8
#define SL_BAD_IP 10
#define SL_NO_INIT 11
#define SL_LOG_ALREADY_OFF 12
#define SL_LOG_ALREADY_ON 13
#define SL_LOG_ERROR 14
#define SL_NOT_A_SOCLOC_SERVER 15

#define SL_CONFIG_PARAMETER_MISSING 20
#define SL_CONFIG_UNABLE_TO_OPEN 21
#define SL_CONFIG_INTERNAL_PARSE_ERROR 22
#define SL_CONFIG_PORT_NOT_NUMERIC 23
#define SL_CONFIG_PORT_OUT_OF_RANGE 24
#define SL_CONFIG_HOST_EXIST 25

#define SL_SEND_ADD 60
#define SL_SEND_DELETE 61
#define SL_SEND_CONFIG_ADD 62
#define SL_SEND_CONFIG_DELETE 63
#define SL_SEND_FIND 64
#define SL_SEND_CONFIG_FIND 65
#define SL_SEND_FIND_LIST 66
#define SL_SEND_GET_LIST 67
#define SL_SEND_PUT_LIST 68
#define SL_SEND_CONFIG_GET_LIST 69
#define SL_SEND_CONFIG_PUT_LIST 70
#define SL_SEND_DUMP_DEBUG 71
#define SL_SEND_CONFIG_DUMP_DEBUG 72
#define SL_SEND_TERM SOCKET_SEND_TERM
#define SL_SEND_STATUS SOCKET_SEND_STATUS
#define SL_SEND_LOG_OFF SOCKET_SEND_LOG_OFF
#define SL_SEND_LOG_ON SOCKET_SEND_LOG_ON
#define SL_SEND_LOG_STATUS SOCKET_SEND_LOG_STATUS
#define SL_SEND_SERVICE_NAME SOCKET_SEND_SERVICE_NAME
#define SL_SEND_VERSION SOCKET_SEND_VERSION

#define SL_MAXCOMMAND 32767
#define SL_LIST_DELIM '^'
#define SL_SERVICE_NAME "socloc"


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.