vbCoders Guest



Don't have an account yet? Register
 


Forgot Password?



__WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets co

by Deano Splamoni (15 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 31st July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

__WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets connecting to one socket and they all get

API Declarations


'== ws
'== wsc
'== wsl
'in wsl and wsc put the index as 0
'so now they should be wsl(0) and wsc(0)
'make a command button named cmd1

Rate __WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets co



Dim a  As Long
a = wsc.UBound    'Gets the last index of the array
Load wsc(a + 1)   'loads another socket
wsc(a + 1).Connect "127.0.0.1", 15000      'connects to 127.0.0.1 (local)
End Sub

Private Sub Form_Load()
ws.Listen                          'sets the master socket to listen
End Sub                            'yet it never stops

Private Sub ws_ConnectionRequest(ByVal requestID As Long)
Dim a As Long
a = wsl.UBound         'Gets the last index of the array
Load wsl(a + 1)        'Loads another socket
wsl(a + 1).Accept requestID         'Acceptst the Connection Request onto 
End Sub                             'the new socket

Private Sub wsc_Connect(Index As Integer)
MsgBox "Socket " & Index & " Is Connected!"       'Tells you when its
End Sub                                           'connected!

Download Snippet Download this snippet   Add to My Save List Add to My Saved Code

__WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets co Comments

No comments have been posted about __WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets co. Why not be the first to post a comment about __WINSOCK__ Transfer's A Connection request to an open socket. This means you can have 5 sockets co.

Post your comment

Subject:
Message:
0/1000 characters