SaiSeng
asked on
Socketing One Server n One Client
i hav this applet which has
Quote:
init ()
{
//interface codings
}
void actionPerformed()
{
if (e.getActionCommand=="Host ")
{
// i wanted to create serverSocket here but it just seems to be hang here, listening connection, and i couldnt click on any GUI component
}
elseif (e.getActionCommand=="Join ")
// so as happen to this after i hav created socket.
}
and how am i suppose to write the socket code??
in order to let the server always listen client, and able to send msg to client
same goes to client, always listen to server, and able to send msg to server
my source's at : http://www.geocities.com/giasens/JavaBingo.zip
corresponding file in the zip: bing2.java
thanks...
Quote:
init ()
{
//interface codings
}
void actionPerformed()
{
if (e.getActionCommand=="Host
{
// i wanted to create serverSocket here but it just seems to be hang here, listening connection, and i couldnt click on any GUI component
}
elseif (e.getActionCommand=="Join
// so as happen to this after i hav created socket.
}
and how am i suppose to write the socket code??
in order to let the server always listen client, and able to send msg to client
same goes to client, always listen to server, and able to send msg to server
my source's at : http://www.geocities.com/giasens/JavaBingo.zip
corresponding file in the zip: bing2.java
thanks...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please proceed with that recommendation.
ASKER
sorry ... i just found out i should hav implement thread. btw, thanks :)
>> i just found out i should hav implement thread
That is what I had suggested.
That is what I had suggested.
What exactly are you trying to do?