<repo_name>Rahul7171/Java-Program-s<file_sep>/TCPServer.java
//Tcp connection from server side
import java.io.*;
import java.net.*;
public class TCPServer
{  
    public static void main(String args[]) throws Exception
    {
            	ServerSocket serversocket=new ServerSocket(3000);
	System.out.println("Server is ready for chatting");
	Socket s=serversocket.accept();
	                    //Reading from keyboard
	 BufferedReader   keyRead=new BufferedReader(new InputStreamReader(System.in));
                  OutputStream ostream=s.getOutputStream();
	PrintWriter pwrite=new PrintWriter(ostream,true);
	InputStream istream=s.getInputStream();
                 BufferedReader receiveRead=new BufferedReader(new InputStreamReader(istream));
	String receiveMessage,sendMessage;
                 while(true)
	{
                  	if((receiveMessage=receiveRead.readLine())!=null)
                    	{
 			System.out.println(receiveMessage);
                   	}
	sendMessage=keyRead.readLine();
           	pwrite.println(sendMessage);
           	pwrite.flush();
	}
          }
        
}                <file_sep>/ConnectionTest.java
import java.io.*;
class ConnectionTest
{
	public static void main(String args[]);
	{
	try{
	class.forName("sun.jdbc.odbc.jdbcodbcDriver");
	System.out.println("Driver Loaded");
	String url="jdbc.odbc."
	Connection con=DriverManager.getConnection(url);
	system.out.println("Connection to database created");
	}
	catch(SQLException e)
	{
		system.out.println("SQL Error");
	}
	catch(Exception e)
	{
		System.out.println(e);
	}
	}
}
<file_sep>/README.md
# Java-Program-s<file_sep>/TCPClient.java
import java.net.*;
import java.io.*;
public class TCPClient
{
		public static void main(String args[])throws Exception{
		Socket sock=new Socket("192.168.127.12",3000);
		BufferedReader keypad=new BufferedReader(new InputStreamReader(System.in));
		OutputStream os=sock.getOutputStream();
		PrintWriter pw=new PrintWriter(os,true);
		InputStream istream=sock.getInputStream();
		BufferedReader recieveRead=new BufferedReader(new InputStreamReader(istream));
		System.out.println("Start the chitchat,and type Enter key");
		String sm,rm;
		while(true)
		{
			sm=keypad.readLine();
			pw.println(sm);
			pw.flush();
		
		if((rm=recieveRead.readLine())!=null)
		{
			System.out.println(rm);
		}
		}
	}
}