| Posted: 27 December 2008 at 2:28pm | IP Logged
|
|
|
Hi all,
Either i'm doing something wrong, or there is something wrong with the component on my VB4-32. I'm trying to program a IRC Chat Server. The socket listens on port 6667, that is no problem, but when I get mIRC to connect on it, it stays connected causing my application to crash.
The code is below:
Private Sub Winsock2_OnConnectionRequest(ByVal requestID As Long) Dim newsocket As Long Winsock2.Accept requestID TCP1.Connected = True Form1.list1.AddItem "Activity on IRC Server detected..."
End Sub
Private Sub Winsock2_OnConnect() Winsock2.SendData "127.0.0.1 NOTICE AUTH :*** Looking up your hostname" & vbCrLf & vbCrLf
End Sub
Private Sub Winsock2_OnDataArrival(ByVal bytesTotal As Long) Dim sBuffer As String Winsock2.GetData sBuffer
End Sub
Why does it crash??? 
Safiria
|