...
 
Commits (1)
......@@ -52,15 +52,16 @@ enum {
#ifdef BUILD_JSDOCS
static char* client_prop_desc[] = {
"instance of <a href=#Socket>Socket class</a> representing client's TCP/IP connection"
,"client's IPv4 or IPv6 address"
"client's IPv4 or IPv6 address"
,"client's host name (up to 64 characters)"
,"client's TCP or UDP port number"
,"date/time of initial connection (in time_t format)"
,"protocol/service name (e.g. 'Telnet', 'FTP', etc.)"
,"user's name/alias"
,"user's number (non-zero if logged in)"
/* this next one must be last */
,"instance of <a href=#Socket>Socket class</a> representing client's TCP/IP connection"
,NULL
};
#endif
......@@ -188,13 +189,13 @@ JSObject* DLLCALL js_CreateClientObject(JSContext* cx, JSObject* parent
JS_SetPrivate(cx, obj, client); /* Store a pointer to client_t */
js_CreateSocketObject(cx, obj, "socket", sock, session);
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Represents a TCP/IP client session",310);
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", client_prop_desc, JSPROP_READONLY);
#endif
js_CreateSocketObject(cx, obj, "socket", sock, session);
return(obj);
}
......
......@@ -43,8 +43,8 @@
static char* msg_area_prop_desc[] = {
"message area settings (bitfield) - see <tt>MM_*</tt> in <tt>sbbsdefs.js</tt> for details"
"FidoNet NetMail settings (bitfield) - see <tt>NMAIL_*</tt> in <tt>sbbsdefs.js</tt> for details"
"Internet NetMail settings (bitfield) - see <tt>NMAIL_*</tt> in <tt>sbbsdefs.js</tt> for details"
,"FidoNet NetMail settings (bitfield) - see <tt>NMAIL_*</tt> in <tt>sbbsdefs.js</tt> for details"
,"Internet NetMail settings (bitfield) - see <tt>NMAIL_*</tt> in <tt>sbbsdefs.js</tt> for details"
,NULL
};
......
......@@ -1741,10 +1741,8 @@ enum {
#ifdef BUILD_JSDOCS
static char* socket_prop_desc[] = {
/* statically-defined properties: */
"array of socket option names supported by the current platform"
/* Regular properties */
,"error status for the last socket operation that failed - <small>READ ONLY</small>"
"error status for the last socket operation that failed - <small>READ ONLY</small>"
,"error description for the last socket operation that failed - <small>READ ONLY</small>"
,"<i>true</i> if socket is in a connected state - <small>READ ONLY</small>"
,"<i>true</i> if socket can accept written data - Setting to false will shutdown the write end of the socket."
......@@ -1763,6 +1761,9 @@ static char* socket_prop_desc[] = {
,"<i>true</i> if binary data is to be sent in Network Byte Order (big end first), default is <i>true</i>"
,"set to <i>true</i> to enable SSL as a client on the socket"
,"set to <i>true</i> to enable SSL as a server on the socket"
/* statically-defined properties: */
,"array of socket option names supported by the current platform"
,NULL
};
#endif
......@@ -2090,7 +2091,7 @@ static jsSyncPropertySpec js_socket_properties[] = {
{ "remote_ip_address" ,SOCK_PROP_REMOTE_IP ,SOCK_PROP_FLAGS, 310 },
{ "remote_port" ,SOCK_PROP_REMOTE_PORT ,SOCK_PROP_FLAGS, 310 },
{ "type" ,SOCK_PROP_TYPE ,SOCK_PROP_FLAGS, 310 },
{ "family" ,SOCK_PROP_FAMILY ,SOCK_PROP_FAMILY, 318 },
{ "family" ,SOCK_PROP_FAMILY ,SOCK_PROP_FLAGS, 318 },
{ "network_byte_order",SOCK_PROP_NETWORK_ORDER,JSPROP_ENUMERATE, 311 },
{ "ssl_session" ,SOCK_PROP_SSL_SESSION ,JSPROP_ENUMERATE, 316 },
{ "ssl_server" ,SOCK_PROP_SSL_SERVER ,JSPROP_ENUMERATE, 316 },
......@@ -2699,9 +2700,6 @@ connected:
return(JS_FALSE);
}
if(!js_DefineSocketOptionsArray(cx, obj, type))
return(JS_FALSE);
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class used for outgoing TCP/IP socket communications",317);
js_DescribeSyncConstructor(cx,obj,"To create a new ConnectedSocket object: "
......@@ -2717,6 +2715,9 @@ connected:
JS_DefineProperty(cx,obj,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
if(!js_DefineSocketOptionsArray(cx, obj, type))
return(JS_FALSE);
dbprintf(FALSE, p, "object constructed");
return(JS_TRUE);
......@@ -3000,9 +3001,6 @@ js_socket_constructor(JSContext *cx, uintN argc, jsval *arglist)
return(JS_FALSE);
}
if(!js_DefineSocketOptionsArray(cx, obj, type))
return(JS_FALSE);
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,obj,"Class used for TCP/IP socket communications",310);
js_DescribeSyncConstructor(cx,obj,"To create a new Socket object: "
......@@ -3016,6 +3014,9 @@ js_socket_constructor(JSContext *cx, uintN argc, jsval *arglist)
js_CreateArrayOfStrings(cx, obj, "_property_desc_list", socket_prop_desc, JSPROP_READONLY);
#endif
if(!js_DefineSocketOptionsArray(cx, obj, type))
return(JS_FALSE);
dbprintf(FALSE, p, "object constructed");
return(JS_TRUE);
}
......