socket in java
Java
import java.io.*;
import java.net.*;
public class MyServer {
public static void main(String[] args){
try{
ServerSocket ss=new ServerSocket(6666);
Socket s=ss.accept();//establishes connection
DataInputStream dis=new DataInputStream(s.getInputStream());
String str=(String)dis.readUTF();
System.out.println("message= "+str);
ss.close();
}catch(Exception e){System.out.println(e);}
}
}
Also in Java:
- Title
- java binary exponentiation
- Category
- Java
- Title
- countdown timer with seekbar
- Category
- Java
- Title
- javafx datepicker
- Category
- Java
- Title
- convert date to calendar java
- Category
- Java
- Title
- how to exit a for loop in java
- Category
- Java
- Title
- read a file in java and store as integer array using buffered reader
- Category
- Java
- Title
- capitalize string java
- Category
- Java
- Title
- how to declare list of object in java as constant
- Category
- Java
- Title
- java output array lists to file
- Category
- Java
- Title
- counting the number of characters in a string java
- Category
- Java
- Title
- int to string java
- Category
- Java
- Title
- how to multiply a number by itself using for loop in java
- Category
- Java
- Title
- sdkmanager JAVA_HOME invalid directory
- Category
- Java
- Title
- kotlin enable and disable parents view children
- Category
- Java
- Title
- how to add a keylistener to a jframe
- Category
- Java
- Title
- processing string to int
- Category
- Java
- Title
- binary search tree insert java
- Category
- Java
- Title
- logging in java
- Category
- Java
- Title
- how to write sensor data into file android studio
- Category
- Java
- Title
- resurce leak java
- Category
- Java
- Title
- java observable to observer
- Category
- Java
- Title
- how to instanciate map.entry java
- Category
- Java
- Title
- java final modifier on method
- Category
- Java
- Title
- how-to-use-volley-string-request-in-android
- Category
- Java
- Title
- how to append to a string in java
- Category
- Java
- Title
- java read integer from text file into array scanner
- Category
- Java
- Title
- initiralizing an arraylist java
- Category
- Java
- Title
- convert char to string java
- Category
- Java
- Title
- java call another constructor
- Category
- Java
- Title
- jenkins decrypt password script console
- Category
- Java
- Title
- java public static void main
- Category
- Java
- Title
- prime number program in java
- Category
- Java
- Title
- how to convert string to double in android studio
- Category
- Java
- Title
- java switch multiple values
- Category
- Java
- Title
- java newinstance alternative
- Category
- Java
- Title
- count number of matches in two strings java
- Category
- Java
- Title
- java find if element of list in present in another list
- Category
- Java
- Title
- int to binary string java
- Category
- Java
- Title
- how to take binary input in java
- Category
- Java
- Title
- islowercase java
- Category
- Java
- Title
- write an object java in a file
- Category
- Java
- Title
- how to check if a list is empty java
- Category
- Java
- Title
- Category
- Java
- Title
- java 8 retrieve all list from object into single list and ignore duplicates
- Category
- Java
- Title
- java make arraylist
- Category
- Java
- Title
- remove part of string java
- Category
- Java
- Title
- java hashmap syntax
- Category
- Java
- Title
- not equal to java
- Category
- Java
- Title
- java list contains object with property
- Category
- Java
- Title
- what is static setter and getter examples in java
- Category
- Java
- Title
- java startActivity crash
- Category
- Java
- Title
- java print type of object
- Category
- Java
- Title
- java calendar add minutes
- Category
- Java
- Title
- split by new line java
- Category
- Java
- Title
- getordefault java
- Category
- Java
- Title
- spigot action bar
- Category
- Java
- Title
- how to substring in java
- Category
- Java
- Title
- how to create a thread local variable in java
- Category
- Java
- Title
- integer to string java
- Category
- Java
- Title
- restart application programmatically android
- Category
- Java
- Title
- random boolean java
- Category
- Java
- Title
- java flood fill
- Category
- Java
- Title
- java generate list of random element
- Category
- Java
- Title
- how to make array of objects in java and use it
- Category
- Java
- Title
- how to ask user for his location in android
- Category
- Java
- Title
- do statement java
- Category
- Java
- Title
- decomposer chaine de caractère java
- Category
- Java
- Title
- how to use pow function in java
- Category
- Java
- Title
- how to implement a interface in java
- Category
- Java
- Title
- java method to capitalize first letter
- Category
- Java
- Title
- java method overriding
- Category
- Java
- Title
- how to use spring in java
- Category
- Java
- Title
- how to add java_home in mac
- Category
- Java
- Title
- NumSelfDivisors java
- Category
- Java
- Title
- java stream find specific element
- Category
- Java
- Title
- java 8 find in list by property
- Category
- Java
- Title
- how do you concatenate an int with a string in java
- Category
- Java
- Title
- iterate trough linked list java
- Category
- Java
- Title
- online money transfer andhra bank
- Category
- Java
- Title
- how to use an abstract class in java
- Category
- Java
- Title
- array methods in java
- Category
- Java
- Title
- jtable font size
- Category
- Java
- Title
- get today date in java 8
- Category
- Java
- Title
- java variable string
- Category
- Java
- Title
- connecting to h2 database from java
- Category
- Java
- Title
- android round double to 2 decimal
- Category
- Java
- Title
- traversal of list in java
- Category
- Java
- Title
- initialiser une arraylist
- Category
- Java
- Title
- como saber de que tipo es una variable en java
- Category
- Java
- Title
- counting repeated characters in a string in java
- Category
- Java
- Title
- create java windows application
- Category
- Java
- Title
- calculate days between two dates in java
- Category
- Java
- Title
- check if a string is a substring of another string java
- Category
- Java
- Title
- how to do substring java
- Category
- Java
- Title
- multiple string java
- Category
- Java
- Title
- how to find the divisors of a number in java
- Category
- Java
- Title
- how to replace in java
- Category
- Java
- Title
- java get last element of list
- Category
- Java
- Title
- random code
- Category
- Java
- Title
- send variable intent
- Category
- Java