Home
last modified time | relevance | path

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

123456

/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.java48 private MockServerSocket serverSocket; field in TcpServerOutputTest
58 serverSocket = new MockServerSocket(); in setup()
63 return serverSocket; in setup()
72 serverSocket.waitForAccept(); in testShutdownWithoutConnection()
79 serverSocket.waitForAccept(); in testShutdownWithConnection()
80 new ExecutionDataWriter(serverSocket.connect().getOutputStream()); in testShutdownWithConnection()
90 final Socket socket = serverSocket.connect(); in testWriteExecutionData()
121 final Socket socket = serverSocket.connect(); in testInvalidHeader()
127 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/linux-kselftest/tools/testing/selftests/bpf/
Dtcp_server.py36 serverSocket = None variable
39 serverSocket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) variable
41 try: serverSocket.bind(('localhost', 0))
45 sn = serverSocket.getsockname()
57 serverSocket.listen(MAX_PORTS)
58 readList = [serverSocket]
67 if sock == serverSocket:
68 (clientSocket, address) = serverSocket.accept()
76 serverSocket.close()
/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/jacoco/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/
DDumpTest.java40 private ServerSocket serverSocket; field in DumpTest
44 if (serverSocket != null) { in after()
45 serverSocket.close(); in after()
93 serverSocket = new ServerSocket(0, 0, InetAddress.getByName(null)); in startMockServer()
98 serveRequest(serverSocket.accept()); in startMockServer()
104 return serverSocket.getLocalPort(); in startMockServer()
124 final ServerSocket serverSocket = new ServerSocket(0, 0, in unusedPort() local
126 final int port = serverSocket.getLocalPort(); in unusedPort()
127 serverSocket.close(); in unusedPort()
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/jdwp/
DSocketTransportWrapper.java48 private ServerSocket serverSocket; field in SocketTransportWrapper
85 serverSocket = new ServerSocket(port, 0, hostAddr); in startListening()
87 serverSocket = new ServerSocket(port); in startListening()
93 iAddress = serverSocket.getInetAddress(); in startListening()
102 address = hostNameOrAddress + ":" + serverSocket.getLocalPort(); in startListening()
111 if (serverSocket != null) { in stopListening()
112 serverSocket.close(); in stopListening()
125 synchronized (serverSocket) { in accept()
126 serverSocket.setSoTimeout((int) acceptTimeout); in accept()
128 transportSocket = serverSocket.accept(); in accept()
[all …]
/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/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/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/antlr/runtime/ObjC/Framework/
DDebugEventSocketProxy.m51 serverSocket = -1;
61 if (serverSocket != -1)
62 shutdown(serverSocket,SHUT_RDWR);
63 serverSocket = -1;
71 if ( serverSocket==nil ) {
72 serverSocket = new ServerSocket(port);
73 socket = serverSocket.accept();
124 if (serverSocket == -1) {
125 serverSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
127 NSAssert1(serverSocket != -1, @"Failed to create debugger socket. %s", strerror(errno));
[all …]
/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/vogar/src/vogar/monitor/
DTargetMonitor.java50 final ServerSocket serverSocket = new ServerSocket(port); in await() local
51 serverSocket.setSoTimeout(ACCEPT_TIMEOUT_MILLIS); in await()
52 serverSocket.setReuseAddress(true); in await()
53 final Socket socket = serverSocket.accept(); in await()
57 serverSocket.close(); in await()
/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.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-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.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/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.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/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/
DJPDADebuggeeSynchronizer.java55 protected ServerSocket serverSocket = null; field in JPDADebuggeeSynchronizer
201 serverSocket = new ServerSocket(serverAddress.getPort(), 0, serverAddress.getAddress()); in bindServer()
202 int localPort = serverSocket.getLocalPort(); in bindServer()
218 serverSocket.setSoTimeout((int) timeout); in startServer()
220 clientSocket = serverSocket.accept(); in startServer()
264 if (serverSocket != null) in stop()
265 serverSocket.close(); in stop()
/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/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/
DChannelType.java75 SSLSocket accept(ServerSocket serverSocket, SSLSocketFactory factory) throws IOException { in accept() argument
76 assertFalse(serverSocket instanceof SSLServerSocket); in accept()
77 Socket wrapped = serverSocket.accept(); in accept()
100 SSLSocket accept(ServerSocket serverSocket, SSLSocketFactory factory) throws IOException { in accept() argument
101 assertFalse(serverSocket instanceof SSLServerSocket); in accept()
102 ServerSocketChannel serverChannel = serverSocket.getChannel(); in accept()

123456