Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46d67ff

Browse files
Update SimpleSocketRunner.java
1 parent ba6920f commit 46d67ff

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎SocketClasses/src/TCP_Sockets/SocketClient/SimpleSocketRunner.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ public static void main(String[] args) throws IOException {
1919
try(Socket firstSocket = new Socket(inetAddress,7777);
2020
DataOutputStream outputStream = new DataOutputStream(firstSocket.getOutputStream());
2121
DataInputStream inputStream = new DataInputStream(firstSocket.getInputStream())){
22-
23-
/* Посылаем запрос к серверу */
24-
outputStream.writeUTF("Hello my first SERVER!!!");
25-
/* Получаем ответ от сервера, мы точно знаем, что это строка и мы ее ждем */
26-
System.out.println("Response from SERVER: " + inputStream.readUTF());
22+
outputStream.writeUTF("Hello my first SERVER!!!"); // Посылаем запрос к серверу
23+
System.out.println("Response from SERVER: " + inputStream.readUTF()); // Получаем ответ от сервера, мы точно знаем, что это строка и мы ее ждем
2724
}
2825

2926
/*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /