No, It does not work
I have a big problem withe the ordinary socket...
User Profile
Collapse
-
SocketChannel problem
dear all ,
I'm trying to write a socket program . using the SocketChannel.. .
but I don't receive any thing from the server. why ???????
this my code
...Code:address = new InetSocketAddress("***.***.**.**",**** ); channel = SocketChannel.open(address); byte[] b = getAuthenticationLoginString("***","********"); -
The answer for your question is (yes)., server sends a bunch of bytes
is socketchannel solve this problem ??
socketchannel is non-blocking..
waiting
can I write to u directly ?? to ur eamil...Leave a comment:
-
dear Jos,
thanks for reply..
I'm in a big problem , that I can't solve it
my IT director ask me to build an application to get data from a server.
so I make a socket connection with this server.
I send first the authentication to the server, so server send ALLOW message.
then I start to send request and it response with a response message.
the PROBLEM is that I can't get all the response message....Leave a comment:
-
socket
I have an application that send requests to a server and then server respond.
request ... response
request ... response
... ...
so how can I manage this application?
can I used the socketChannel or socket ??????????????? ???
blocking sockets or non-blocking sockets ??????????????? ?
please reply -
many thanks for u and for ur valuable time
---------------------------------------------------------------
so I tried to get all the data by looping with the InputStream, but I get another problem
[code=java]
os.write(getAut henticationRedG reenInfoString( ));
os.flush();
Thread.sleep(30 00); // must sleep a while to get the server response
DataInputStream is = new DataInputStream (mySocket.getIn putStream());...Leave a comment:
-
socket problem,,,,, plz help
my problem is
I have socket between server and a client
the client sending data to the server, so the server respond to the client with the response
this my code for receive the response data
----------------------------------------------------------
os.write(getAut henticationRedG reenInfoString( ));
os.flush();
Thread.sleep(30 00);
DataInputStream is = new DataInputStream (mySocket.getIn putStream());...
No activity results to display
Show More
Leave a comment: