Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Simple NIO sockets example.

Reply
Thread Tools

Simple NIO sockets example.

 
 
dp
Guest
Posts: n/a
 
      06-02-2005
I want to be able to send a HTTP-post to a server, not knowing if it's
online or not. This needs to be done frequently, and in multiple
concurrent threads (centralized message logging).

I've tried URLConnection and Sockets, both of them lock the thread
while tying to connect to the server. I havn't found any timeout
settings for the connect, only for established connections. I'd like to
keep resouces used to a minium and avoid creating additional time-out
threads.

>From what I've read, NIO sockets seems to be the way to go. I haven't

found much info on this subject though. Could someone please help me
with a simple NIO socket example of a HTTP POST command with a connect
timeout?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nio sockets + SetTcpNoDelay Exception... Kam Java 0 10-13-2004 08:48 PM
NIO with timeouts != NIO? iksrazal Java 1 06-18-2004 02:28 PM
Need some clarification and/or help with java NIO sockets HDSkiFreak Java 2 05-11-2004 01:48 PM
a simple question about sockets Jerem38 Java 4 05-07-2004 08:23 PM
Q: simple sockets, bind, and socket error 10048 Johannes Eble Python 1 07-16-2003 12:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57