WEBVTT

00:00.280 --> 00:05.010
All right you know beginning with the programming aspect of it working.

00:05.150 --> 00:06.050
Right.

00:06.060 --> 00:13.650
So when we come on to our project in that it runs Viken variety let me create a new package inside this

00:13.650 --> 00:23.850
particular file so I'll create a package that we call the package as I'll call it as you know next week.

00:24.360 --> 00:28.860
So I'm called the sprocket is networking inside networking.

00:28.860 --> 00:30.820
I have a new python file.

00:30.960 --> 00:32.810
Let me call it for now.

00:32.990 --> 00:36.670
Try and right.

00:36.860 --> 00:44.180
It's already a python file so I went and let me create a python file which is also called us.

00:44.240 --> 00:48.150
So with a line inside the looking package.

00:48.280 --> 00:48.670
Right.

00:48.800 --> 00:55.560
So both of them are ready for me and I can start up right away to create a client and to create a server.

00:55.820 --> 00:56.420
Ok.

00:56.660 --> 01:04.590
Now coming to all client and client side coding in quited involves a few steps.

01:04.620 --> 01:08.730
All right where the steps are as follows.

01:08.810 --> 01:14.660
1 create a client socket.

01:15.160 --> 01:17.580
Create a client's office.

01:17.680 --> 01:24.700
Or rather it's just create a socket just create a socket know what does the socket socket is something

01:25.150 --> 01:32.030
which which has which guns is solf

01:35.860 --> 01:42.540
most IP address and port them.

01:43.160 --> 01:49.000
So it is nothing but a socket is nothing but an application that is going to be active.

01:49.890 --> 01:53.750
At a particular port of a device which is connected to the end of it.

01:53.790 --> 01:54.330
Right.

01:54.390 --> 01:56.640
So it consists of all of these things.

01:56.640 --> 02:01.650
It says socket is nothing but something which consists of what IP address and port number rage is connected

02:01.650 --> 02:02.510
to the Internet.

02:02.610 --> 02:04.930
Along with that it's active at a particular point.

02:04.980 --> 02:07.270
That's a socket right.

02:07.310 --> 02:12.380
So Greetings then the second thing off the plating a socket if it is a client side code what you need

02:12.380 --> 02:24.950
to do is connect connect the socket to Oh so the socket connect the socket which you have created do

02:24.950 --> 02:30.080
a service like the connect communicate.

02:30.080 --> 02:30.910
Right.

02:31.340 --> 02:38.680
Maybe send maybe a receipt coming the kids fall off to you communicate or do you can do it.

02:38.690 --> 02:43.760
So you create a socket you can make the socket so the socket you communicate with each other.

02:43.900 --> 02:44.320
Right.

02:44.330 --> 02:47.920
This the client talked to the service so we'll talk to the client and so on.

02:47.920 --> 02:56.190
So they communicate now after the communication part comes you create you connect you communicate.

02:56.240 --> 03:03.740
Then if you want to stop communicating with a server close your socket knows your suck.

03:03.960 --> 03:04.610
That's it.

03:04.650 --> 03:05.800
The steps declined.

03:05.830 --> 03:10.990
Our friend Lisa now coming to the server right now.

03:11.030 --> 03:15.050
Silverside requires a few more steps.

03:15.200 --> 03:21.440
Create a socket is same server also requires to have a socket.

03:21.620 --> 03:32.450
But this time I need to see bind the socket bind the socket to up put to killer to a particular port

03:33.260 --> 03:34.700
number.

03:34.730 --> 03:35.560
Why.

03:35.620 --> 03:40.720
Because it can be convenient for different clients to connect to a particular port like say for example

03:40.720 --> 03:43.080
if you're setting up shop somewhere right.

03:43.230 --> 03:48.820
You will put it somewhere which is more accessible for multiple customers maybe maybe a grocery shop

03:48.850 --> 03:54.750
maybe in a residential area or three can be somewhere near a public spot.

03:55.090 --> 03:55.730
Right.

03:55.780 --> 04:01.920
So you have something where you need to bind to bind the socket to a particular port number.

04:02.110 --> 04:03.330
So you need to do that.

04:03.640 --> 04:13.420
OK so you have to say OK my server socket is going to be bound to both AT&amp;T or port number one two three

04:13.420 --> 04:14.860
four or put number 80.

04:14.920 --> 04:20.100
That's how each of the server sockets are bound to a particular port them up to you bind the socket

04:20.100 --> 04:25.170
to a particular or the server has to listen for clients.

04:25.260 --> 04:25.620
Right.

04:25.770 --> 04:31.710
Let's say for example you set up shop somewhere and I'm setting up shop at a particular address what

04:31.710 --> 04:35.640
if you close the shuttle and stay at home.

04:35.640 --> 04:39.330
Is there any recall is there any use of the server or is there any use of the shop.

04:39.330 --> 04:46.500
No there is used the shop only if after you open the shop you wait and listen for you wait and listen

04:46.500 --> 04:49.160
for some kind of customers to come.

04:49.200 --> 04:51.340
Right you're listening for our clients.

04:51.340 --> 04:57.450
Now you listen for clients let's say a client connected a client connected to the server.

04:57.600 --> 05:04.080
In this particular step right a line connected to the service or the minute a client connects the signal

05:04.080 --> 05:14.320
must do our job of a set thing during the connection right excepting the connection if except it's in

05:14.350 --> 05:17.720
all except the client connection.

05:17.940 --> 05:23.500
So if you accept the particular client connection you know that client will connect to the server.

05:23.520 --> 05:27.750
There will be something like You know it's something like this right.

05:27.750 --> 05:30.900
You bet there is a particular power to.

05:30.900 --> 05:33.980
How does the shopkeeper get back to the client.

05:34.230 --> 05:40.770
OK that's it for example if you go to a restaurant the shopkeeper is the one who you know who is managing

05:40.770 --> 05:41.380
everything.

05:41.800 --> 05:42.310
OK.

05:42.330 --> 05:46.200
And you want to eat food you go to one of the tables.

05:46.350 --> 05:49.840
Ok you place the order while a waiter right.

05:49.980 --> 05:51.440
It goes to the shop.

05:51.750 --> 05:56.150
Then it goes to maybe though you know the guys make the food.

05:56.370 --> 06:00.470
And then from there it comes back to you while away.

06:00.870 --> 06:01.330
Right.

06:01.500 --> 06:09.320
So when you accept the connection menu except the connection it's basically you are accepting one you're

06:09.330 --> 06:17.640
accepting a particular you know a something like a means of communication yet accepting a connection

06:17.640 --> 06:24.630
itself which means this connection is established until the connection is closed and people can keep

06:24.630 --> 06:26.070
communicating with each other.

06:26.300 --> 06:26.880
OK.

06:26.880 --> 06:32.230
So this connection is established it's like a means of talking to each other that connection to the

06:32.230 --> 06:32.460
stuff.

06:32.460 --> 06:34.490
So you need to accept the connection.

06:34.510 --> 06:42.980
Ok off accepting the connection to most things you know you need to communicate right up to communicating.

06:43.020 --> 06:44.800
So send receive data.

06:45.100 --> 06:46.020
They're communicating.

06:46.020 --> 06:54.270
All I need to do is close the active connection close the active branch.

06:54.690 --> 06:55.230
Right.

06:55.260 --> 06:59.820
So let's say for example if there were many lines which are connecting which you're trying to connect

06:59.830 --> 07:03.240
with so what do you have to accept each of the connections separately.

07:03.270 --> 07:11.490
One or the other then OK you need to communicate with each connection individually wired different different

07:11.490 --> 07:14.670
radios maybe but you need to communicate with each of them.

07:14.970 --> 07:20.550
Right and then close the active or close all the active protections and up to closing all the active

07:20.550 --> 07:24.540
connections you can close over.

07:25.090 --> 07:26.840
You can close this up.

07:27.440 --> 07:28.830
You're right.

07:29.100 --> 07:29.890
OK.

07:30.100 --> 07:35.180
So with this with this we understand the steps to create a client.

07:35.230 --> 07:38.190
So now let's get into the programming aspect of.
