Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Help] Synchronous Sockets

Newbie Spellweaver
Joined
Jan 3, 2009
Messages
25
Reaction score
0
In C#, I've been trying to use Synchronous Sockets... But when I try and send Data through the Socket, It gives me the error that saids the Server hasn't been connected yet...

my class
Code:
    public static void Connection()
    {
        TcpListener l = new TcpListener(IPAddress.Any, 8484);
        l.Start();
        running = true;
        try
        {
            l.Server.Send(new Byte[] { 0x10 });
        }
        catch (SocketException se)
        {
            Logger.Error(se);
        }
        while (running)

        {
      
        }
        Thread.Sleep(1);
    }
 
Custom Title Activated
Loyal Member
Joined
Apr 8, 2008
Messages
1,125
Reaction score
330
Is this all there is to your Server-side programming? If so, Connection has to be called through the Main method.
 
Last edited:
Skilled Illusionist
Joined
Apr 6, 2007
Messages
384
Reaction score
2
Where are you trying to send that data to? You've made a listen socket, but there's no connected socket.
 
Newbie Spellweaver
Joined
Jan 3, 2009
Messages
25
Reaction score
0
yeah i did

---------- Post added at 05:00 PM ---------- Previous post was at 04:59 PM ----------

yea i did

---------- Post added at 05:07 PM ---------- Previous post was at 05:00 PM ----------

well can somebody make an example how to send data and recieve data through a synchronous socket?
 
Back
Top