Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by darknuke

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

Posted
<<<< :p dumbass

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

Posted (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 by darknuke

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

Posted (edited)
That would help but... how come in my console app it worked fine but in a normal vb project it doesn't? Edited by darknuke

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

Posted
VB

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...