Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
//UDP Severimport java.net.*; import java.net.InetAddress; class UDPServer { public static void main(String args[])throws Exception { DatagramSocket serverSocket = new DatagramSocket(9876); byte[] receiveData=new byte[1024]; byte[] sendData=new byte[1024]; while(true) { System.out.println("Server is Up"); DatagramPacket receivePacket=new DatagramPacket(receiveData,receiveData.length); serverSocket.receive(receivePacket); String sentence=new String(receivePacket.getData()); System.out.println("RECEIVED:"+sentence); InetAddress IPAddress=receivePacket.getAddress(); int port=receivePacket.getPort(); String capitalizedSentence=sentence.toUpperCase(); sendData=capitalizedSentence.getBytes(); DatagramPacket sendPacket=new DatagramPacket(sendData,sendData.length,IPAddress,port); serverSocket.send(sendPacket); } } }//UDP Clientimport java.io.*; import java.net.*; import java.net.InetAddress; class UDPClient { public static void main(String[] args)throws Exception { BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in)); DatagramSocket clientSocket=new DatagramSocket(); InetAddress IPAddress=InetAddress.getByName("localhost"); byte[] sendData=new byte[1024]; byte[] receiveData=new byte[1024]; System.out.println("Enter the sting to be converted in to Upper case"); String sentence=inFromUser.readLine(); sendData=sentence.getBytes(); DatagramPacket sendPacket=new DatagramPacket(sendData,sendData.length,IPAddress,9876); clientSocket.send(sendPacket); DatagramPacket receivePacket=new DatagramPacket(receiveData,receiveData.length); clientSocket.receive(receivePacket); String modifiedSentence=new String(receivePacket.getData()); System.out.println("FROM SERVER:"+modifiedSentence); clientSocket.close(); } }
While executing on eclipse, I get an error when I run server code saying address already in use, line number 9Can you help me out mam
change your Port number!
@@gouthamir1807 you my college senior
Mam did my exam very well coz of ur videos Thanks :)
ಮೇಡಂ transformation of sentence ಬಗ್ಗೆಯೂ ಸ್ವಲ್ಪ ಹೇಳಿಕೊಡಿ, ನೀವು ತುಂಬಾ ಚೆನ್ನಾಗಿ ಅರ್ಥ ಮಾಡುಸ್ತಿರಿ it's my request also 🙏
thank you so much i learnt udp socket programming
Thank you for this video ma'am.It helped me a lot. Ma'am can upload the computer networks theory video also...
Thanks a Lot ❤❤🙏🙏🙏mam Really I was in Need With it.
Thank you very much madam its helps me a lots madam
I really appreciate it 👍.
Thankyou so much mam😊😊
Thanks a lot ma'am
Thank you soo much... Helps a lot✌️
Thank you mam pls upload program 9 Tcp/Ip.
Sure!
Please put a 5th standered computer lesson mam
Thanks mam
Mam so much headache for the exam 😭😭😭
😜
Mam wether execution is compulsory to pass the exam?Please reply
:) According to rules YES! but ofcourse depends on your examiner
@@roopamam7005 Mam I both program executed in the lab, I'm very happy now, thanks for these videos :)
Thats great :)
//UDP Sever
import java.net.*;
import java.net.InetAddress;
class UDPServer
{
public static void main(String args[])throws Exception
{
DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData=new byte[1024];
byte[] sendData=new byte[1024];
while(true)
{
System.out.println("Server is Up");
DatagramPacket receivePacket=new DatagramPacket(receiveData,receiveData.length);
serverSocket.receive(receivePacket);
String sentence=new String(receivePacket.getData());
System.out.println("RECEIVED:"+sentence);
InetAddress IPAddress=receivePacket.getAddress();
int port=receivePacket.getPort();
String capitalizedSentence=sentence.toUpperCase();
sendData=capitalizedSentence.getBytes();
DatagramPacket sendPacket=new
DatagramPacket(sendData,sendData.length,IPAddress,port);
serverSocket.send(sendPacket);
}
}
}
//UDP Client
import java.io.*;
import java.net.*;
import java.net.InetAddress;
class UDPClient
{
public static void main(String[] args)throws Exception
{
BufferedReader inFromUser=new BufferedReader(new InputStreamReader(System.in));
DatagramSocket clientSocket=new DatagramSocket();
InetAddress IPAddress=InetAddress.getByName("localhost");
byte[] sendData=new byte[1024];
byte[] receiveData=new byte[1024];
System.out.println("Enter the sting to be converted in to Upper case");
String sentence=inFromUser.readLine();
sendData=sentence.getBytes();
DatagramPacket sendPacket=new
DatagramPacket(sendData,sendData.length,IPAddress,9876);
clientSocket.send(sendPacket);
DatagramPacket receivePacket=new DatagramPacket(receiveData,receiveData.length);
clientSocket.receive(receivePacket);
String modifiedSentence=new String(receivePacket.getData());
System.out.println("FROM SERVER:"+modifiedSentence);
clientSocket.close();
}
}
While executing on eclipse, I get an error when I run server code saying address already in use, line number 9
Can you help me out mam
change your Port number!
@@gouthamir1807 you my college senior
Mam did my exam very well coz of ur videos Thanks :)
ಮೇಡಂ transformation of sentence ಬಗ್ಗೆಯೂ ಸ್ವಲ್ಪ ಹೇಳಿಕೊಡಿ, ನೀವು ತುಂಬಾ ಚೆನ್ನಾಗಿ ಅರ್ಥ ಮಾಡುಸ್ತಿರಿ it's my request also 🙏
thank you so much i learnt udp socket programming
Thank you for this video ma'am.It helped me a lot.
Ma'am can upload the computer networks theory video also...
Thanks a Lot ❤❤🙏🙏🙏mam Really I was in Need With it.
Thank you very much madam its helps me a lots madam
I really appreciate it 👍.
Thankyou so much mam😊😊
Thanks a lot ma'am
Thank you soo much... Helps a lot✌️
Thank you mam pls upload program 9 Tcp/Ip.
Sure!
Please put a 5th standered computer lesson mam
Thanks mam
Mam so much headache for the exam 😭😭😭
😜
Mam wether execution is compulsory to pass the exam?
Please reply
:) According to rules YES! but ofcourse depends on your examiner
@@roopamam7005 Mam I both program executed in the lab, I'm very happy now, thanks for these videos :)
Thats great :)