Home
last modified time | relevance | path

Searched refs:serverSocket (Results 1 – 25 of 100) sorted by relevance

1234

/external/jacoco/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/
DMockServerSocketTest.java36 private ServerSocket serverSocket; field in MockServerSocketTest
52 serverSocket = new ServerSocket(16300, 1, addr); in setup()
54 serverSocket = new MockServerSocket(); in setup()
61 serverSocket.close(); in teardown()
70 return ((MockServerSocket) serverSocket).connect(); in connect()
77 assertFalse(serverSocket.isClosed()); in testClose()
78 serverSocket.close(); in testClose()
79 assertTrue(serverSocket.isClosed()); in testClose()
86 return serverSocket.accept(); in testCloseWhileAccept()
90 serverSocket.close(); in testCloseWhileAccept()
[all …]
DTcpServerOutputTest.java49 private MockServerSocket serverSocket; field in TcpServerOutputTest
59 serverSocket = new MockServerSocket(); in setup()
64 return serverSocket; in setup()
73 serverSocket.waitForAccept(); in testShutdownWithoutConnection()
80 serverSocket.waitForAccept(); in testShutdownWithConnection()
81 new ExecutionDataWriter(serverSocket.connect().getOutputStream()); in testShutdownWithConnection()
91 final Socket socket = serverSocket.connect(); in testWriteExecutionData()
122 final Socket socket = serverSocket.connect(); in testInvalidHeader()
128 serverSocket.waitForAccept(); in testInvalidHeader()
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DDelegatingServerSocketFactory.java37 ServerSocket serverSocket = delegate.createServerSocket(); in createServerSocket() local
38 return configureServerSocket(serverSocket); in createServerSocket()
43 ServerSocket serverSocket = delegate.createServerSocket(port); in createServerSocket() local
44 return configureServerSocket(serverSocket); in createServerSocket()
49 ServerSocket serverSocket = delegate.createServerSocket(port, backlog); in createServerSocket() local
50 return configureServerSocket(serverSocket); in createServerSocket()
56 ServerSocket serverSocket = delegate.createServerSocket(port, backlog, ifAddress); in createServerSocket() local
57 return configureServerSocket(serverSocket); in createServerSocket()
60 protected ServerSocket configureServerSocket(ServerSocket serverSocket) throws IOException { in configureServerSocket() argument
62 return serverSocket; in configureServerSocket()
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/jdwp/
DSocketTransportWrapper.java48 private ServerSocket serverSocket; field in SocketTransportWrapper
84 serverSocket = new ServerSocket(port, 0, hostAddr); in startListening()
86 serverSocket = new ServerSocket(port); in startListening()
92 iAddress = serverSocket.getInetAddress(); in startListening()
97 address = iAddress.getHostName() + ":" + serverSocket.getLocalPort(); in startListening()
105 if (serverSocket != null) { in stopListening()
106 serverSocket.close(); in stopListening()
118 synchronized (serverSocket) { in accept()
119 serverSocket.setSoTimeout((int) acceptTimeout); in accept()
121 transportSocket = serverSocket.accept(); in accept()
[all …]
/external/jacoco/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/
DTcpServerOutput.java37 private ServerSocket serverSocket; field in TcpServerOutput
53 serverSocket = createServerSocket(options); in startup()
56 while (!serverSocket.isClosed()) { in startup()
58 synchronized (serverSocket) { in startup()
60 serverSocket.accept(), data); in startup()
67 if (!serverSocket.isClosed()) { in startup()
80 serverSocket.close(); in shutdown()
81 synchronized (serverSocket) { in shutdown()
/external/jetty/src/java/org/eclipse/jetty/server/
DShutdownMonitor.java76 if (serverSocket == null) in run()
81 while (serverSocket != null) in run()
86 socket = serverSocket.accept(); in run()
115 close(serverSocket); in run()
116 serverSocket = null; in run()
155 if (serverSocket == null) in start()
175 serverSocket = new ServerSocket(port,1,InetAddress.getByName("127.0.0.1")); in startListenSocket()
179 port = serverSocket.getLocalPort(); in startListenSocket()
194 serverSocket = null; in startListenSocket()
201 debug("%s",serverSocket); in startListenSocket()
[all …]
/external/mockftpserver/tags/2.3/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
141 this.serverControlPort = serverSocket.getLocalPort(); in run()
152 Socket clientSocket = serverSocket.accept(); in run()
182 if (serverSocket != null) { in run()
183 serverSocket.close(); in run()
206 if (serverSocket != null) { in stop()
208 serverSocket.close(); in stop()
315 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
331 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.5/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java90 private ServerSocket serverSocket = null; field in AbstractFtpServer
140 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
142 this.serverControlPort = serverSocket.getLocalPort(); in run()
153 Socket clientSocket = serverSocket.accept(); in run()
183 if (serverSocket != null) { in run()
184 serverSocket.close(); in run()
207 if (serverSocket != null) { in stop()
209 serverSocket.close(); in stop()
316 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
332 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.4/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java90 private ServerSocket serverSocket = null; field in AbstractFtpServer
140 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
142 this.serverControlPort = serverSocket.getLocalPort(); in run()
153 Socket clientSocket = serverSocket.accept(); in run()
183 if (serverSocket != null) { in run()
184 serverSocket.close(); in run()
207 if (serverSocket != null) { in stop()
209 serverSocket.close(); in stop()
316 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
332 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/MockFtpServer/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java90 private ServerSocket serverSocket = null; field in AbstractFtpServer
140 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
142 this.serverControlPort = serverSocket.getLocalPort(); in run()
153 Socket clientSocket = serverSocket.accept(); in run()
183 if (serverSocket != null) { in run()
184 serverSocket.close(); in run()
207 if (serverSocket != null) { in stop()
209 serverSocket.close(); in stop()
316 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
332 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/caliper/caliper/src/main/java/com/google/caliper/runner/
DServerSocketService.java115 private ServerSocket serverSocket; field in ServerSocketService
121 checkState(serverSocket != null, "Socket has not been opened yet"); in getPort()
122 return serverSocket.getLocalPort(); in getPort()
138 serverSocket = new ServerSocket(0 /* bind to any available port */); in startUp()
145 socket = serverSocket.accept(); in run()
196 serverSocket.close(); in triggerShutdown()
203 serverSocket.close(); in shutDown()
/external/mockftpserver/tags/2.0/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
303 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
319 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.2/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
179 if (serverSocket != null) { in run()
180 serverSocket.close(); in run()
304 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
320 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.0.1/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
289 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
305 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.0-rc3/MockFtpServer/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
303 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
319 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.1/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
299 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
315 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.0.2/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
290 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
306 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.0-rc1/MockFtpServer/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java89 private ServerSocket serverSocket = null; field in AbstractFtpServer
139 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
146 serverSocket.setSoTimeout(500); in run()
149 Socket clientSocket = serverSocket.accept(); in run()
174 if (serverSocket != null) { in run()
175 serverSocket.close(); in run()
303 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
319 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/mockftpserver/tags/2.0-rc1/src/main/java/org/mockftpserver/core/server/
DAbstractFtpServer.java110 private ServerSocket serverSocket = null; field in AbstractFtpServer
160 serverSocket = serverSocketFactory.createServerSocket(serverControlPort); in run()
167 serverSocket.setSoTimeout(500); in run()
170 Socket clientSocket = serverSocket.accept(); in run()
195 if (serverSocket != null) { in run()
196 serverSocket.close(); in run()
324 boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); in isShutdown()
340 return serverThread != null && serverThread.isAlive() && serverSocket != null; in isStarted()
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/
DJPDADebuggeeSynchronizer.java55 protected ServerSocket serverSocket = null; field in JPDADebuggeeSynchronizer
198 serverSocket = new ServerSocket(serverAddress.getPort(), 0, serverAddress.getAddress()); in bindServer()
199 int localPort = serverSocket.getLocalPort(); in bindServer()
215 serverSocket.setSoTimeout((int) timeout); in startServer()
217 clientSocket = serverSocket.accept(); in startServer()
261 if (serverSocket != null) in stop()
262 serverSocket.close(); in stop()
/external/antlr/antlr-3.4/runtime/ObjC/Framework/
DANTLRDebugEventProxy.m51 serverSocket = -1;
61 if (serverSocket != -1)
62 shutdown(serverSocket,SHUT_RDWR);
63 serverSocket = -1;
71 if (serverSocket == -1) {
72 serverSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
74 NSAssert1(serverSocket != -1, @"Failed to create debugger socket. %s", strerror(errno));
77 …setsockopt(serverSocket, SOL_SOCKET, SO_KEEPALIVE|SO_REUSEPORT|SO_REUSEADDR|TCP_NODELAY, (void *)&…
84 …NSAssert1( bind(serverSocket, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) != -1, @"b…
86 NSAssert1(listen(serverSocket,50) == 0, @"listen(2) failed. %s", strerror(errno));
[all …]
/external/vogar/src/vogar/monitor/
DTargetMonitor.java51 final ServerSocket serverSocket = new ServerSocket(port); in await() local
52 serverSocket.setSoTimeout(ACCEPT_TIMEOUT_MILLIS); in await()
53 serverSocket.setReuseAddress(true); in await()
54 final Socket socket = serverSocket.accept(); in await()
58 serverSocket.close(); in await()
/external/tpm2/
DTcpServer.c174 SOCKET listenSocket, serverSocket; in PlatformSvcRoutine() local
193 serverSocket = accept(listenSocket, in PlatformSvcRoutine()
196 if(serverSocket == SOCKET_ERROR) in PlatformSvcRoutine()
204 continueServing = PlatformServer(serverSocket); in PlatformSvcRoutine()
205 closesocket(serverSocket); in PlatformSvcRoutine()
248 SOCKET serverSocket; in RegularCommandService() local
266 serverSocket = accept(listenSocket, in RegularCommandService()
269 if(serverSocket ==SOCKET_ERROR) in RegularCommandService()
277 continueServing = TpmServer(serverSocket); in RegularCommandService()
278 closesocket(serverSocket); in RegularCommandService()
/external/caliper/caliper/src/test/java/com/google/caliper/runner/
DServerSocketServiceTest.java72 OpenedSocket serverSocket = pendingServerConnection.get(); in getConnectionIdTwice_acceptComesFirst() local
73 assertEndsConnected(clientSocket, serverSocket); in getConnectionIdTwice_acceptComesFirst()
116 private void assertEndsConnected(OpenedSocket clientSocket, OpenedSocket serverSocket) in assertEndsConnected() argument
118 serverSocket.writer().write("hello client!"); in assertEndsConnected()
119 serverSocket.writer().flush(); // necessary to prevent deadlock in assertEndsConnected()
124 assertEquals("hello server!", serverSocket.reader().read()); in assertEndsConnected()
/external/okhttp/okio/okio/src/test/java/okio/
DSocketTimeoutTest.java93 final ServerSocket serverSocket = new ServerSocket(0); in socket() local
94 serverSocket.setReuseAddress(true); in socket()
95 serverSocket.setReceiveBufferSize(SOCKET_BUFFER_SIZE); in socket()
101 socket = serverSocket.accept(); in socket()
117 Socket socket = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in socket()

1234