robot313
09-08-2001, 08:58 AM
I don't know why this code doesn't work. It's the code it says to use in the SocketWrench Developer's Guide for a sample program.
I'm using this code:
<pre><font color=blue>Private</font color=blue> <font color=blue>Sub</font color=blue> Form_Load()
Socket1.AddressFamily = AF_INET
Socket1.Protocol = IPPROTO_IP
Socket1.SocketType = SOCK_STREAM
Socket1.Binary = <font color=blue>False</font color=blue>
Socket1.Blocking = <font color=blue>False</font color=blue>
Socket1.BufferSize = 1024
Socket2(0).AddressFamily = AF_INET
Socket2(0).Protocol = IPPROTO_IP
Socket2(0).SocketType = SOCK_STREAM
Socket2(0).Blocking = <font color=blue>False</font color=blue>
Socket2(0).LocalPort = IPPORT_ECHO
Socket2(0).Action = SOCKET_LISTEN
LastSocket = 0
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></pre>
When I run the program it says:
Run-time error '24044':
Specified socket type is not supported in this address family.
I'm using this code:
<pre><font color=blue>Private</font color=blue> <font color=blue>Sub</font color=blue> Form_Load()
Socket1.AddressFamily = AF_INET
Socket1.Protocol = IPPROTO_IP
Socket1.SocketType = SOCK_STREAM
Socket1.Binary = <font color=blue>False</font color=blue>
Socket1.Blocking = <font color=blue>False</font color=blue>
Socket1.BufferSize = 1024
Socket2(0).AddressFamily = AF_INET
Socket2(0).Protocol = IPPROTO_IP
Socket2(0).SocketType = SOCK_STREAM
Socket2(0).Blocking = <font color=blue>False</font color=blue>
Socket2(0).LocalPort = IPPORT_ECHO
Socket2(0).Action = SOCKET_LISTEN
LastSocket = 0
<font color=blue>End</font color=blue> <font color=blue>Sub</font color=blue></pre>
When I run the program it says:
Run-time error '24044':
Specified socket type is not supported in this address family.