WEBVTT

00:00.150 --> 00:07.500
So that I have all the connections of each of the clients with the name in in this particular client's

00:07.500 --> 00:10.150
dictionary so I can use them anytime I want.

00:10.350 --> 00:13.590
So I can just say are we here for the minute I get data.

00:13.770 --> 00:20.970
I need to save for every client in clients for every client and clients.

00:21.090 --> 00:27.660
All I need to do is I need to send it to their connections to their respective collections and their

00:27.660 --> 00:38.610
respective connections are stored in clients of sorry inclines us inclines us their particular client

00:38.610 --> 00:41.820
of their particular dictionary the name of their particular name.

00:41.880 --> 00:46.380
So Cline's of client so client is already their name.

00:46.520 --> 00:46.980
Right.

00:47.160 --> 00:55.420
Because you just went through all your keys clients of client God docs and all that send all.

00:55.440 --> 01:00.290
I just need to send the data which I just got from this client's data.

01:00.870 --> 01:09.080
Dot dot dot encoded just encode it and set it right.

01:09.080 --> 01:11.400
I sent it to each of the lines.

01:11.600 --> 01:12.200
Right.

01:12.290 --> 01:15.350
But when I send it don't just send data.

01:15.650 --> 01:19.790
OK let's send a message complete message so let me clear the message.

01:19.910 --> 01:24.680
Message will be the name the current name of this particular client.

01:24.860 --> 01:31.510
The client name plus Let's put a call in with a space.

01:31.690 --> 01:38.510
And along with the name I need to send Also the data that this guy is saying.

01:38.510 --> 01:41.020
So they thought let's decode it.

01:41.240 --> 01:44.540
OK let's decode sorry not in code.

01:44.580 --> 01:50.470
Oh I'm sure in code That's what have you received.

01:50.470 --> 01:51.570
Right.

01:51.640 --> 01:54.670
So what have you received from the particular client connection.

01:54.680 --> 01:55.000
Correct.

01:55.000 --> 01:57.970
So data that decode not encode and suicide.

01:58.030 --> 02:03.880
So I'm going to decode and whatever it is that I need to send it to all the other clients.

02:03.880 --> 02:07.780
So whatever I have got the message the message is in a string.

02:07.780 --> 02:13.700
So I just send the same message that message does encode messages a string right

02:16.530 --> 02:18.320
so up there.

02:18.400 --> 02:26.340
I have sent the message along with the client names so that will come up there on each of the clients.

02:26.640 --> 02:29.190
But I do not need to send it to the same place.

02:29.200 --> 02:31.020
OK so we come to that a little later.

02:31.350 --> 02:36.820
OK so we have completely finished up with the client's name that de-code.

02:36.840 --> 02:37.440
All right.

02:37.560 --> 02:42.240
Now let's in the Cline that we buy all I have to do after the name is I need to have all these functions

02:42.480 --> 02:52.960
receive and send it same as the previous one def send send data and receive data.

02:53.230 --> 02:59.310
I have both of them active send the reseeded or what I can have is let's say let's here we're here.

02:59.310 --> 03:04.380
I'll say so in the reseeded or what I can have this I can have for which.

03:04.670 --> 03:20.810
The C-s dot receive invites started Nehra ended up saying Dehra that de-code correct.

03:21.000 --> 03:24.250
And what we get from here.

03:24.300 --> 03:27.600
Take it from the user input.

03:28.440 --> 03:42.200
Take it as user input and code it and then send it to C S C S that send all user input taught in code

03:43.310 --> 03:46.490
correct and coded and then send it fine.

03:46.520 --> 03:52.890
So let's say this is about user input in code and then send it to the particular.

03:52.910 --> 04:01.270
This needs to be sent again and again and again and again hence you need to have one while she is great.

04:01.400 --> 04:03.450
So you can just print that.

04:03.590 --> 04:09.710
You don't need to say from where you got it because the server is already doing that and sending it

04:09.710 --> 04:10.360
to you.

04:10.720 --> 04:11.420
OK.

04:11.600 --> 04:14.590
So with this we have finished with the deaf send data.

04:15.110 --> 04:19.870
Let's say we hear all I need to do was I need to create a thread.

04:20.150 --> 04:32.030
So when I create a thread it is going to ask me to import that from threading Imphal thread and when

04:32.030 --> 04:38.750
I create a thread all I need to do is let's say Fred and I need to say Target Target what what am I

04:38.750 --> 04:39.560
going to talk.

04:39.560 --> 04:49.260
I need to truncate or let's say I get that and that's when I started in T did not start.

04:49.820 --> 05:01.110
Right after you cheated Studd all I aim to do is afterwork do not start I can I can call Senderos in

05:01.110 --> 05:02.100
the main trick.

05:02.130 --> 05:02.780
Right.

05:02.820 --> 05:05.990
So this is about the client side and the server side.

05:06.030 --> 05:08.660
So I need to stop the previous server.

05:08.670 --> 05:10.830
Otherwise it will not work.

05:11.310 --> 05:16.960
So both of them are so close all disclose everything and moves to a new.

05:17.080 --> 05:19.490
So let's see if it works if it doesn't.

05:19.590 --> 05:21.150
We'll have to make a few changes.

05:21.360 --> 05:23.510
So let's do that control should 10.

05:23.550 --> 05:25.110
The server is waiting.

05:25.140 --> 05:27.430
Let's see if a client can up to.

05:27.680 --> 05:32.670
A controller destined for the client and here name let's say x y z.

05:33.360 --> 05:38.680
And to so it has got a connection from client address this thing.

05:38.960 --> 05:41.180
OK let's run another client up.

05:41.200 --> 05:42.680
So run one more client.

05:42.920 --> 05:48.190
So this guy's ABC let's say got a client.

05:48.340 --> 05:50.300
So we got another connection.

05:50.520 --> 05:51.090
OK.

05:51.150 --> 05:52.150
And one more client.

05:52.300 --> 05:56.140
Let's say you are all right.

05:56.140 --> 06:01.470
So I got a connection from clients so we can treat clients rather than the room.

06:01.810 --> 06:08.070
OK so fine one will say Hi guys.

06:09.340 --> 06:10.960
But it doesn't get printed.

06:10.990 --> 06:12.170
So what's the error.

06:12.310 --> 06:13.930
Let's say no.

06:13.960 --> 06:22.660
So we made a mistake somewhere in thread one so in Thread 1 there's the particular line line 14.

06:23.110 --> 06:26.070
So this the critical line message got in code.

06:26.320 --> 06:38.380
So you had the name Cline's of client has no attribute in code message message was client name which

06:38.380 --> 06:46.650
I had taken in OK client name class how it's not a comma.

06:46.740 --> 06:47.630
It's a plus.

06:47.630 --> 06:50.340
And so we made a mistake out there.

06:50.460 --> 06:58.200
Cool so which means you have to stop all of them and rerun things out there so stop all of them and

06:59.090 --> 06:59.790
close all

07:03.650 --> 07:07.850
round the server once again control to death then.

07:08.570 --> 07:18.660
And let's open up the client the PBI control ship death 10:00 a.m. ABC hoping fingers crossed no errors.

07:18.840 --> 07:25.000
P Q R and of course you're going to have one more client that's x y z.

07:26.140 --> 07:27.470
Sorry.

07:28.660 --> 07:30.070
Here.

07:31.660 --> 07:32.380
Three clients.

07:32.390 --> 07:32.860
OK.

07:32.960 --> 07:34.220
All of them connected.

07:34.460 --> 07:41.180
So let's say it says hey guys oh ABC got ABC got himself saying hi guys.

07:41.210 --> 07:50.180
And the other two also got saying ABC is hi guys let's say let's say X Y Z says hi so x y z got from

07:50.180 --> 07:57.550
both the ends crazy gets printed on both the client saying hi rate Well of course when X Y Z sends a

07:57.550 --> 08:02.360
message high x y z himself should not get the message back.

08:02.400 --> 08:05.560
It should really go to the other two clients it should not come to himself.

08:05.590 --> 08:08.170
So what should be the change in the program let's stop everything.

08:10.010 --> 08:15.130
Let's stop all of them and stop all these.

08:15.340 --> 08:17.470
All of them and close everything.

08:17.470 --> 08:19.740
And what triggered the change that I need to make.

08:19.740 --> 08:25.000
So all the change that you do is I should not send it to all the clients clients of clients and all

08:25.510 --> 08:35.320
if I should say if if a client that you have is equal to or equal to the same as the client name that

08:35.320 --> 08:44.510
I've got from is the same as the client name which I have passed or if it's not.

08:44.620 --> 08:50.780
So it is not equal to if they are not equal to then send it if they're equal don't say it.

08:50.920 --> 08:52.500
So this is something which I need to say.
