accept « Socket « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » Socket » accept 

1. Java NIO: Relationship between OP_ACCEPT and OP_READ?    stackoverflow.com

I am re-writing the core NIO server networking code for my project, and I'm trying to figure out when I should "store" connection information for future use. For example, once ...

2. s.accept ( ) method, gives me an error ?    coderanch.com

Which Version of the JDK are you using? The problem appears to be a condition called something like self referential error. It's a documented bug with certain versions. Basically the compiler sees that s may not get itialized in the constructor because it exists inside of braces and it complains. set s to null when you declare it ServerSocket s = ...

3. SSLSocket accept problem    coderanch.com

This compiles ok under JDk1.5 Beta. Added the imports and two closing braces import java.io.*; import java.net.*; import javax.net.ssl.*; public class Serveur { public static void main(String[] args) throws IOException { final int port = 4000; SSLServerSocket serverSocket=null; try { SSLServerSocketFactory factory =( SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); serverSocket = (SSLServerSocket)factory.createServerSocket(port); } catch (IOException e) { System.err.println("Could not listen on port: 4444."); System.exit(1); } ...

4. .accept() problem    coderanch.com

Hopefully this is the right forum, I didn't know whether or not in belonged in sockets or threads, so the mods can move it to the other one if necessary, and sorry for the problems if you do. So, what we're suppose to be doing is creating a multi-threaded server that allows for, possibly, an infinite amount of clients. The program ...

5. myServerSocket.accept() terminating on linux    coderanch.com

Hi there I am busy building a server that listens on port 1109 on a linux machine. When I run the code on a windows machine I have no problems and the server runs indefinitely. When I run the same server on our linux web server, the process gets to the .accept() call where is waits for about 3-5 minutes before ...

6. interrupting a Socket.accept()    coderanch.com

thanks, that did it. i'm still confused about threads... enough so that i'm seriously considering trying your second suggestion, even though i'm on 1.4, just so i won't have to mess around so much with Thread references! for reference: i now pass a reference to the main thread in to my subthreads. (that reference can be retrieved using a static method ...

7. server socket and accept call    coderanch.com

Sun's tutorial says that the accept call returns a socket with new port so that the server can still accept connections on the port to which it was bound ( eg port 80 for HTTP Server). I went thru some material and a brief glance at Stevens book and could not find this thing elaborated. an IP packet is represented by ...

8. accept().. (how many ports can it handle?)    coderanch.com

Hi all. In preperation for an exam question I would be gratefull for the following info. ServerSocket.accept() returns an instance of a new socket.. I got that.. but does it open a new port for every connection?.. if so how does it decide which port to use ? is there a pre defined approach (eg. it just increments the port number ...

9. accept()...Just so I am clear On This    coderanch.com

Hi All Excuse my apparent misunderstanding of this topic, I would just like to be totally clear on something. accept() .. blocks, waiting.. a connection comes in and is passed off to a new port number.. the ServerSocket then goes back and continues to wait for connections on the original port... another connection comes in.. this is passed of to another ...

10. TCP/Socket mechanics of "Accept()" etc.    coderanch.com

Hi, I wouldn't mind some clarification on the issue of listening sockets and the "serverSocket.Accept()" functionality for creating socket connections. I have not yet been completely satisfied with the explanations in the posts here. In particular where we are talking about source and destination TCP ports at each end of the connection. I've had a pretty good look for this information ...

11. Socket Accept    coderanch.com

We all know that socket.accept(); means accept the connection if its requested but does anyone one how to do the following if ( Connection request is received) { dont accept immediately and ask the user. } i am searching for the method but i didnt find it can anybody help me with this please

12. ServerSocketChannel.accept() seems to create a random port to send data to?    coderanch.com

Hey! I'm new to Java and server/client programming and I'm writing a non-blocking nio socket server that connects to flash clients for a chat application. The flash client can connect and send data fine to the server, but receiving data is a different story. I checked everything -- the data I want to send is getting all the way to the ...

15. socket.accept() method ?    forums.oracle.com

The accept() Method blocks the server (Main)Thread until a client connects to the server. Thats why the program doesn't proceed any further. But btw are you sure the the port you are using isn't blocked/used by another program? You should maybe check that on the IANA Website. Otherwise just use a higher port number, for example 55555. These ports are most ...

16. Socket programing problem(accept function)    forums.oracle.com

17. Accepting sockets but only for so long..    forums.oracle.com

Meanwhile, the other thread sleeps until the timeout is reached. When it wakes up, it checks the flag. If the flag indicates that the other thread accepted within the time limit, then this thread does a join() on that thread, possibly a join(long) if you only want it to wait a certain amount of time for the socket thread to finish ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.