Re: a problem with Socket

From: NetShiva (netshiva27_at_yahoo.com)
Date: 08/20/04


Date: 20 Aug 2004 03:45:20 -0700

Looks like you are looking to build an tcp server in java.. check this
out www.quickserver.org i use it and it rocks..

"alessandro" <halex2000@virgilio.it> wrote in message news:<5O3Tc.104772$OR2.5466361@news3.tin.it>...
> Ok, now the problem with the connection is solved: when the server was
> listening and I closed the connection, I didn't call ServerSocket.close(),
> so the next time the system wouln't let me create the same ServerSocket.
>
> > Use a java.nio.Selector to handle multiple connections from a single
> > thread.
>
> I don't know what JVM version is installed on the target machine. It could
> be not the 1.4. Other than that, is not this the very problem.
>
> > On the other hand, if there will only be a single connection, there is
> > no reason to not let your process block while waiting for input from
> > the peer.
>
> There is a GUI. The user should be able to interact with it.
>
> >If you use ready() or available() in a loop that just reads
> > from a single Reader or InputStream, you are simply wasting CPU in
> > order to avoid an imagined problem.
>
> This would not be a problem. The read() method would be called from a timer
> 10 times per second or so.
>
> The problem is that (following the documentation), available() always
> returns 0 on some systems, and should not be used in these manners. Then I
> tried ready(), but returns false. I would like not to use a separate thread
> for the network class, since that would mean adding a lot of extra code.
> This app will be used just one time (university project) from my
> professor...
> Thank you for the help.
>
> Alessandro



Relevant Pages

  • Re: Outgoing POP3 email missing/lost/not received
    ... Funny thing is that I have had this ISP for 8 years and it has always been ... It looks like when you last ran CEICW, you set the ISP's mail server to: ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Cannot connect client to server 2003
    ... you need to reconfigure the IP schema of your SBS ... On the SBS 2003 Server open the Server Management console. ... On the Connection Type page, click Broadband, and then click Next. ... Alternate DNS server, type the IP addresses that are provided by your ISP ...
    (microsoft.public.windows.server.sbs)
  • Re: Outgoing POP3 email missing/lost/not received
    ... ISP's mail server instead of the domain name on the ... SUMMARY OF SETTINGS FOR CONFIGURE E-MAIL AND INTERNET ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Networking Question - VLANs on SBS 2003 Premium SP1
    ... port on the old router so I now have a segregated WLAN. ... be sure you do not enable any DHCP server in internal network. ... On the Connection Type page, click Broadband, and then click Next. ... On the Network Connection, You must enable and configure the network ...
    (microsoft.public.windows.server.sbs)
  • Re: Still cant connect to RWW or OWA remotely
    ... it certainly appears to be something about the SBS configuration. ... Meridian.local Ethernet adapter Local Area Connection: ... Windows SMALL BUSINESS SERVER 2003 Windows IP Configuration ... 192.168.254.254) directly to a port on the router and then ...
    (microsoft.public.windows.server.sbs)