darknuke Posted October 4, 2003 Posted October 4, 2003 (edited) Dim ipaddress As Net.IPAddress Dim localAddr As Net.IPAddress = ipaddress.Parse("127.0.0.1") Dim port As Int32 = 13000 Dim server As New TcpListener(localAddr, port) server.Start() Console.Write(">>>>>>>" & Chr(10)) Dim tSocket As Net.Sockets.Socket = server.AcceptSocket Dim timeDate As String = Now() Console.Write("[" & timeDate & "]" & Chr(10) & " Server started (type help for more information)" & Chr(10)) The console stops as soon as I declare tSocket and doesn't do a thing. What's wrong? Edited October 5, 2003 by darknuke Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
Administrators PlausiblyDamp Posted October 4, 2003 Administrators Posted October 4, 2003 It's waiting for an incomming connection. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
darknuke Posted October 4, 2003 Author Posted October 4, 2003 <<<< :p dumbass Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
darknuke Posted October 5, 2003 Author Posted October 5, 2003 (edited) I'm trying to port the console to vb, but am running into problems. This line is causing the program to freeze: Dim tSocket As Net.Sockets.Socket = server.AcceptSocket If I remove it, all of the code works. If I leave it in, not even the code before it works... Is it my system or am I making yet another n00b error? Edited October 5, 2003 by darknuke Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
Administrators PlausiblyDamp Posted October 5, 2003 Administrators Posted October 5, 2003 Probably need to look at using threads to prevent blocking. If you look in the samples that ship with .Net there is a chat program that shows the use of sockets. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
darknuke Posted October 5, 2003 Author Posted October 5, 2003 (edited) That would help but... how come in my console app it worked fine but in a normal vb project it doesn't? Edited October 5, 2003 by darknuke Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
Administrators PlausiblyDamp Posted October 5, 2003 Administrators Posted October 5, 2003 What language was the console app written in? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
darknuke Posted October 5, 2003 Author Posted October 5, 2003 VB Quote This is only a test of the emergency broadcast system This is a product of hysterical mass confusion A ship of fools adrift on the sea of our pollution Rudderless and powerless on the sea of our delusion pennywise - this is only a test
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.