All right let's run this code right now.
Let's let's go on to this quick control chip.
Def Dan are you can you can just see run.
So when you say run it will go to the server.
So it says only one usage of each socket address is normally predicate permitted which means 1 2 3 4
is already being used somewhere.
And so I need to change that.
Let me call this 2000.
Let me check if this works.
Control shift 10.
All right.
So 7 0 so is bound to port.
It says I wanted to see if because I put it up here.
What I can do is I can just stop this
I can just put this as a number.
I'll create a variable whenever I CHANGE YOUR should be reflected everywhere right.
And to put number why to put.
Come on post number whatever is number.
Right.
So I saved this control ship Destin soberest bound to port number 2000 servers listening for clients.
Now client is going to connect to the server at port number 2000 localhost.
OK.
So we want to run this to see control of that 10 for this one to the minute you run that.
Oh it's all recreated and it finished also.
We didn't put any print statements so there is no nothing to print out here on the server side.
OK.
Got a line from address wonderly 7.0 appointer of 1 1 and that plane was at the port number of 68 unifor.
And then what is the message that was sent from the client the messages that are sent from the wind
was high so were I'm inclined.
You said that you got that here on the server side because on the server side you are taking that data
from the client data from the client can receive.
And then you have printed the data or data decode and then you would close the connection and close
the server socket or close.
Right.
So these are the few things that we need to see and we do want to step.
OK.
All right then and now let's understand a few things.
OK.
I want to create something like you know if I want to send some data back from the server to the client
what would I have to do before before before the before the closing of kine and server socket what I
need to do is I need to send data which means I need to see it kind of send all what I need to send.
I need to send it to the client.
So which is the client.
I'm sorry.
I understand the data.
What does the data have from silver dot encode.
You need to put it into bytes right.
And by default it is UTF it cool.
Now you did the send all you need to accept the point.
So let's say I have a client after sending it has to wait and receive.
So you need to wait and receipt so when we receive.
All he can do is wait for how many bytes.
Let's say thousands take that into data take the data and let's say print data dot decode.
Correct.
So if you would first of all the Schober needs to be stopped all servers stopped already.
OK let's run the server once again.
Drillship def then the server is listening for clients.
The client is OK.
Let me run this out here from server.
It's come on the client server side.
Hi sir.
A client.
Both sites data is going here and there.
Right.
But both sides.
It's connection.
Last but remember there is a problem.
You can only send when you send the other guy has to be receiving.
And when this guy sends this guy is receiving but you cannot do both at the same time.
You cannot send and receive at the same time.
Now there comes a problem.
You want to send as well as speech you want to send data.
You want to receive data.
You want to send data receive data from the client from one book things to happen at the same time.
If you want both things to happen at the same time two programs need to run.
That means blind socket that receives complaints are a godsend.
Both of them need to happen at the same time which requires a concept called as we need to go for the
kinds of callers multi-threading.
So we need to understand multi-threading how multi-threading works how two things can be done simultaneously
at the same time.
And then understand how to network in that particular fashion.
So we are heading towards getting a chat operating right where we can chat with one another.
They can we can have a chat operator.
So that's that's where we can head on to and we can we can go on.
All right.