Winsock Connect Function
Posted: Fri Oct 15, 2004 2:58 am
Well I was tired of using my winsock to connect to different servers and writing 3 lines of code just to get the control to connect. So I made the following function:
[color=\"red\"][size=1]* [b]Note[/b]: This is used for Microsoft Winsock Control 6.0[/size][/color]
Public Sub Connect(Server As String, Port As String)
With Winsock1
.RemoteHost = Server
.RemotePort = Port
.Connect
End With
End Sub
Syntax:
Connect \"irc.killanet.net\", \"6667\"
\'This is just an example...
Remember to replace [b]Winsock1[/b] with your own named winsock control.
Such a simple code, but such a help in your coding
/blum.gif\' class=\'bbc_emoticon\' alt=\':P\' />
~Dren (victory)
[color=\"red\"][size=1]* [b]Note[/b]: This is used for Microsoft Winsock Control 6.0[/size][/color]
Public Sub Connect(Server As String, Port As String)
With Winsock1
.RemoteHost = Server
.RemotePort = Port
.Connect
End With
End Sub
Syntax:
Connect \"irc.killanet.net\", \"6667\"
\'This is just an example...
Remember to replace [b]Winsock1[/b] with your own named winsock control.
Such a simple code, but such a help in your coding
~Dren (victory)