X
XELON
Hi,
I'm working on an instant messaging program. It is part of my senior
project. I want to write the server with Java. But I can't decide to
use ServerSocket or Channels(NIO). I searched google and find some
information. They say using NIO is more efficient. But the client side
of software might be written with C, C# or Java. If I use nio instead
of net package, can i connect the server with TCP via any programming
languages' TCP libraries?
And which method do you advice? (nio or net)
To send the message through server, there must be 2 established
connection between users and server. Server is going to keep the
established connections with ArrayList or Vector. If a user(say usr1)
sends a message to another user(say usr2), first the server takes the
message from usr1 and finds the name of recipient from message, and
find the connection between server and usr2 on Vector or ArrayList with
user name. And sends the message to usr2. Is this a correct way of
messaging?
Thanks
I'm working on an instant messaging program. It is part of my senior
project. I want to write the server with Java. But I can't decide to
use ServerSocket or Channels(NIO). I searched google and find some
information. They say using NIO is more efficient. But the client side
of software might be written with C, C# or Java. If I use nio instead
of net package, can i connect the server with TCP via any programming
languages' TCP libraries?
And which method do you advice? (nio or net)
To send the message through server, there must be 2 established
connection between users and server. Server is going to keep the
established connections with ArrayList or Vector. If a user(say usr1)
sends a message to another user(say usr2), first the server takes the
message from usr1 and finds the name of recipient from message, and
find the connection between server and usr2 on Vector or ArrayList with
user name. And sends the message to usr2. Is this a correct way of
messaging?
Thanks