This really is a good Tutorial. The server and client really do work. If they don't for you, it's because you doing something wrong. For a beginner into this stuff, it's really good! Thank you very much dude! Also like the way you speak. very clear and precise. Please could we have a continuation of this project, say like a part 2 where we can make it a simple by-directional chatting client, or where by the server can accept more then 1 connection. Although many seem to think that C# is better then vb, I still believe that vb can still create many good programs. Once again, thank you for this video
@kenlinasobirionwu57765 жыл бұрын
for anyone wondering this still works as of 2019 truly a timeless tutorial
@kenlinasobirionwu57765 жыл бұрын
It actually glad to know u are still around 😀 and thanks for the heart I guess u have a new sub now 😂
@radughita19924 жыл бұрын
For me it does not, using VB 2019, says it does not recognise TCPControl
@kenlinasobirionwu57764 жыл бұрын
@@radughita1992 are u using visual studio 2017? Also I swear it's "Controller" not control
@radughita19924 жыл бұрын
@@kenlinasobirionwu5776 Thanks, I fixed that but now when I run it (I copied the tutorial to a teeth) it gives an error, points to "Server.Start()" and saying "System.Net.Sockets.SocketException The request address is not valid in its context.". Help pls.
@kenlinasobirionwu57764 жыл бұрын
@@radughita1992 ohh I know what u did u got the wrong up or host number I found online a line if code that gets one automatically I'll send it to u when I have time
@rowanlidbury7 жыл бұрын
This is great, tweaked it for .NET Micro Framework. Even a few useful bonus topics thrown in for good measure!
@sanfordhoffman23929 жыл бұрын
That was just awesome. I'm very new to programming. It's a good example of how other network services like SQL handle a connection from a client. I can make use of existing services but to actually create a service that will accept incoming data was just the coolest thing I've seen so far. Thanks for the tutorial. I'm a new fan.
@clintonpopp240410 жыл бұрын
Outstanding Work !!! Finally a VB tutorial in English and one that actually works well with proper procedures. Kudos Brother !!!
@pratimasingh12585 жыл бұрын
Rarely we get to see such useful videos ! Big Thanks ❤❤
@OMcsTwosComplement10 жыл бұрын
Great tutorial! I’m glad you multithreaded properly using delegates instead of disabling the check for illegal cross threads like so many other tutorials on youtube :)
@VBToolbox10 жыл бұрын
Many thanks, good sir. :-D I still made a few flubs on that video, especially talking about the loop-lag and thread sleeping. Seems it had to do with the blocking check with the Server.Pending. Not sure if it's really necessary to use that. I think if you remove it, the loop may not eat so much CPU.
@BlueJay2001410 жыл бұрын
Help... For the code, It says Server.Start() was not handled. Plz help!
@SunilKurhade13 жыл бұрын
very good help to novice user !
@TheJessejunior5 жыл бұрын
man, this was good! it´s a pitty you´ve stoped! thank you anyway!
@VBToolbox5 жыл бұрын
Jessé Junior I still hold out hope of rekindling the channel. Hopefully, Starlink will be able to bring me back online in a year or two. Hopefully, I will have a computer and electricity by then, as well! 😆
@TheJessejunior5 жыл бұрын
let´s hope! until there enjoy the stillness hehe
@karolyvisky62734 жыл бұрын
Nagyon jó videó. Megírtam a modulokat az útmutatások alapján és sok mindent megértettem... Ha Budapesten élnél jó lennél nálam egy üveg finom pálinkára...
@maggotDTV8 жыл бұрын
Id like to see an updated one that continues this project. Add more features such as reading and being able to chat back and forth with a group of people. Thanks so much for this either way!
@bvrider17 жыл бұрын
Worked well!! Keep up the good work I appreciate all your videos.
@HartgerVisserRiel10 жыл бұрын
Nice! Keeps is simple compared to all geeks trying to stuff it with as many variations as possible...
@tomgeorge92483 жыл бұрын
This simplified a lot of understanding for me. Thanks. By the way - Have you expanded on it any? Is there a Part two?
@BitSec10 жыл бұрын
Woow Wow dude Amazing tutorial you can just sit back type everything you type cuz its not going to fast and you can Hear everything you say. Best tutorial i found on the internet about TCP :)
@VBToolbox10 жыл бұрын
I appreciate the great feedback, Ramon. :-D Very happy that it's been helpful to you.
@carlferguson251710 жыл бұрын
VB Toolbox I agree! Great TCP video! Looking forward to watching more of your tutorials.
@VBToolbox10 жыл бұрын
Thanks, Ramon! I'm glad that it was helpful to you. :-D Hopefully, when things slow down at work I will be able to make some more.
@BitSec10 жыл бұрын
VB Toolbox Well i subbed so when new videos are released i will be the first one to watch it :)
@markteal12129 жыл бұрын
loved the video its very helpful to me learning how to do these things on vb.net after Microsoft pretty much doing away with vb6 im having to relearn new steps to do the things I already new how to do before
VB Toolbox I would just like to say that I've been coding with sockets for quite some time, and I must say out of every tutorial I have ever looked at or viewed on the web, Yours is by far the most "Human Understandable" I'm a Delphi Programmer I'm not used to messing with .net Sockets you See i use what are called "INDY" sockets they are a very popular collection of "Blocking Sockets" they work in .net as well but usually they are used for C++, Delphi, and Unix based systems. Ill be subscribing to you :) However I would also like to give you some feedback / request for future video if you have time perhaps you could show us how to properly code a Multi-Client Server Socket system AKA server that accepts multiple clients and is able to keep up with them individually and utilize socket polling of some sort to detect when a client has disconnected and remove them from the active connections list. I can do all of this in C++ and Delphi but man when it comes to this .net stuff I feel like Microsoft really screwed us over by removing easy accessible VCL components such as the Winsock component. I mean used to I could make a socket application in 5 seconds literally but now we have to suffer and write like 20 - 30 lines of code just to get a server going. upsets me sometimes. If you could recommend any good .net socket wrappers or socket VCL components plz send them my way :) TY TY SO MUCH! for the tutorial :)
@VBToolbox10 жыл бұрын
Wow! Thank you much for the positive feedback, TheBitmasterXor. A friend of mine has been working on an awesome multi-client C# project which should have exactly what you're looking for, and much more. I've been hoping to do a translation of it for VB.NET but my increased workload has been crushing me so I haven't had a chance to do much of anything on the tutorials front. :-( I really hope that I can get to this soon. Hang in there! :-)
@BitmasterXor10 жыл бұрын
VB Toolbox No problem VB Toolbox, and take your time I'm in no rush, I have a Multi-client Project successfully coded in "Delphi" and i'm currently working on getting VB.net to successfully connect and communicate with it. The protocol I have desinged is Command ("string") based the server has its own command handlers and is able to feed data back to any client-socket after they request information. I have designed a "queuing" system so the server can not possibly ever become overburdened by the number of incoming requests. I'm looking to expand this project so that any programming language that supports raw sockets can communicate with my server. :)
@Ejioplex4 жыл бұрын
Thank you so much. this tutorial really started me into network programing.
@zarqawi12110 жыл бұрын
Fantastic Tutorial! Thanks man! This Channel helps me so much!
@VBToolbox10 жыл бұрын
Excellent, Abdurahman! :-) Thank you for the positive feedback. I'm happy to know that it's been helpful.
@dylanobrien4622 ай бұрын
It doesn't seems to be working for me the client says connected but the text never makes it to the server i also tried downloading the code files here and they were exactly the same where the text when away but never ended up at the server
@ahmadhussainwebshare10014 жыл бұрын
Thanks Bro . Very helpful tutorial God bless you.
@PinoyEinstein4 жыл бұрын
What is wrong with this: "An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: The requested address is not valid in its context"
@jansterenborg4 ай бұрын
Not working here.. Question what or where can I find a working internal or private IP address?
@blackoiltank4 жыл бұрын
Thanks alot dude for amazing video tutorial that you Made.
@preecharouyprsert28643 жыл бұрын
Thanks so much. That's good as I wanted.
@Vysse66610 жыл бұрын
Good tutorial one thing that works much simpler than using keydown is to use the forms AcceptButton property.
@ervinehinay168210 жыл бұрын
thanks bro i haven't tried it myself yet but i'm sure this really help's a lot..nice tutorial look's like you're really a great programmer!!thanks again keep it up..
@VBToolbox10 жыл бұрын
Thanks, Ervine! I hope it helps out. :-D
@philliberatore42657 жыл бұрын
Thank you for a very basic and simple explanation and network connections. I have been trying to do this for quite some time and everything else I found on the Internet only got me confused. Very good introduction. You might wanna make the font in your programming larger. It is difficult to read on a small screen.
@w2kmedia9209 жыл бұрын
I have a problem. When I debugged it, it says "SocketException was unhandled." An unhandled exception of type 'System.Net..' The problem occured on Public Sub New() and also highlighted Server.Start() part. Please help.
@stackpy9 жыл бұрын
I try to change a another textbox when the server riceve a certain message. But the second textbox does not change. Can you help me? Thanks
@saturninramirez11073 жыл бұрын
Merci Beaucoup
@TheChinobi235 жыл бұрын
Nice video, this made me realize how much i love python
@Mindrust210 жыл бұрын
How do you allow 2 clients to connect to the same server and let them both send messages? This vid has helped me well this far.
@VBToolbox10 жыл бұрын
I'm actually working on such a project, now. I'm not sure how I'll go about making a tutorial for it as it's pretty complex. We've created a multifunctional TCP library that can be used in numerous applications to send/receive variable packet types. At present, it's a sort of IRC client/server app. Right now, I can do multiple client connections with full chat relay, including private messaging. Hopefully, I'll have something I can share soon, but I have a lot of improvements to make.
@rickallenmagbanua28197 жыл бұрын
Job well done. I'd to ask ,would you teach me how to connect all the clients into the server? I have 4 clients and 1 server. Thanks.
@patrickjohnocampo83910 жыл бұрын
Just wow.! A very clear and nice tutorial two thumbs up for you bro. I hope bro. you can update this tutorial. I suggest make an application like Internet cafe timer e.g: adding time, auto lock screen when the times up, etc. :)). Many many thanks to you.
@mcmxciiiRR8 жыл бұрын
On the private Sub of UpdateText i get an error.. below TB.invokeRequired and TB.Invoke ? Any idea's?
@GabeDStudios8 жыл бұрын
So what if i want this to be public? by that i mean multiple people being able to chat? what do i do?
@danyalmathers91469 жыл бұрын
nice tutorial god bless you
@stephansoprano72603 жыл бұрын
😂 you seem to be so desperate
@LakshmanThilakaratne10 жыл бұрын
Very good explanation. I tried this successfully. Thanks very much.. Keep up the good work..
@Grandus114 жыл бұрын
is it possible to use this to connect more than one device at a time and have data coming in from different devices??
@suhaibyahya1179 жыл бұрын
thank's for your help man .appreciate it.
@facepalmzzz9 жыл бұрын
i have trouble with Server.Start() it says An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: The requested address is not valid in its context also i hove trouble with Client = New TcpClient(Host, Port)
@Srlancelot398 жыл бұрын
The IP address you set is probably incorrect. Run cmd.exe, then type ipconfig/all and look for your IPv4 address.
@kevins17387 жыл бұрын
You the man! This is pretty good man!
@luciferlyin6468 жыл бұрын
im using vb visual studio2015 enterprise.. not working.. not error When im Runing program theere notice SocketException was unhanndled what is that...???
@preecharouyprsert28643 жыл бұрын
when i use 2 computer ,it didn't work (but I can share file and folder )? could some one share if i'm wrong ?
@xilith11710 жыл бұрын
Aardaerimus, for some reason the server portion doesn't work for me. I tried following your tut and I also just downloaded the source from someone else but both versions have the same problem. The server never gives me the ":: SERVER STARTED ::" message. just a blank textbox (also, it wont let me close the server UI using the red X button. I have to end debugging from VS). I have found that if I tell it to display a string ("SERVER LOADING") immediately upon form load it does so, so I think it somehow gets caught up on " Server = new TCP control" because that is the only line between the two strings. I have tried shutting down my firewall and antivirus and that hasn't helped. any ideas? Thanks.
@neutronstar67397 жыл бұрын
What if it doesn't connect? What code should I put so it doesn't crash?
@thanosarampatzis716410 жыл бұрын
hey the client is connected with the chat.exe but it can receive any msg how can I fix that?
@_rafael_assis8 жыл бұрын
Thank you so much, you´re a angel , omg, i was searching for it for a long time, omg, thanks thanks THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!
@philt955510 жыл бұрын
Thank u for the tutorial. However, I'm getting error at Server.Start(): System.Net.Sockets.SocketException was unhandled ErrorCode=10049 Message="The requested address is not valid in its context" I thought I typed everything per tutorial. Did I miss something?
@yotoprules93615 жыл бұрын
same thing here. I downloaded the source code and even the pre-built file does not work
@mayyishun95568 жыл бұрын
How can I display the client IP address on the server side using VB.net
@FelixMoBu4 жыл бұрын
my server recieves the messages only while closing the clients form. what did i wrong?
@barttender8 жыл бұрын
You are my hero! Thank you so much!
@GaryHutsonVBA10 жыл бұрын
Fantastic Tutorial! Thanks
@marcelbochra75599 жыл бұрын
very very good video only would ask about adding a textbox to client
@michaelsathekge32629 жыл бұрын
Hi, I have to write code in sockets and I'm a complete beginner... I went through the vid and it was a great introduction. But I think I'm not understanding the basics of sockets programming. I have an application API that I want to interface with and really struggling to get up and running... help?
@Grandus117 жыл бұрын
I have a program in VB6 that allows me to use the same ip address and port and it uses sockets to allow more than one computer to connect to the ip address and port is there a way to do this in the server section of this program??
@tipy81899 жыл бұрын
Salut j'explique mon probleme en francais. J'ai suivi ce tuto a la lettre. Dans l'environnement vb 2012 j'ai entre les codes et fait les interfaces graphiques. J'ai rencontre des erreurs d'executions que j'ai pu gerer avec le gestion exception. Le probleme est que je n'arrive pas pour le test de l'application a lancer le client et le serveur en meme temps. C'est l'un ou l'autre a telle enseigne que lorsque le serveur est lance par exemple, tant que je n'arrete pas le debogage je ne peux pas lancer le client. J'aimerais svp savoir comment gerer ce probleme.
@welp37687 жыл бұрын
I want the server to run as a console application, what should I do about the UpdateText and OnLineReceived textbox codes?
@agustintambo67015 жыл бұрын
nice tutorial. but I have one question, Which is difference between socket and api rest.? which is better ?
@eehwaiquah39819 жыл бұрын
Hi, can you please suggest if i need 2 textbox in both client and server. How can i write the code?
@maslaxabas19939 жыл бұрын
thank you for making this sweet video thank you again
@timflinn38902 жыл бұрын
Very good tutorial. I am getting a Null error when closing the Client App. It only happens when no connection is made between both apps, if I connect and close the client it works fine. Everything works great but I am trying to solve this error. Private Sub Form1_FormClosing >> If Client.Client.Connected = True Then
@douglastan52077 жыл бұрын
Hi, not sure if anyone has experienced the same problem but i seem to be unable to establish a connection on my server. When i set a try catch for Form1_Load, i get an exception. has anyone experienced the same problem? i have been stuck on this problem for days. Still new to VB.
@Thebobfactor9 жыл бұрын
Great video. Thank you!
@mwinn200910 жыл бұрын
Do you have an example of sending and receiving data from a unix box, I have some butchered code that works...sorta I can send the first test to the unix box and get a response, as long as there was no error i can send the second test and so on. If the first test has any error, the second test will fail. An example of the proper way to accomplish something like this would be great. Thanks MW
@kiprussel39837 жыл бұрын
can i start sending files thru server's PC using this codes? I'm working on my capstone and I'm new to network programming
@seymurguliyev34536 жыл бұрын
Thank you for this tutorial
@davidvazquez95239 жыл бұрын
if I want to put the ip manually. How do I do it? Si quiero poner la ip manualmente como le puedo hacer?
@astersixteen81997 жыл бұрын
Sir what if you have form full of text box and copy all inputs in that form from client then send all the input entry into the server How to do it? is it the same ?
@pbrown410 жыл бұрын
great tutorial..would one be able to implement this into a 2 player game online via server connection? eg. a card game, where pic boxes 1-4 are visible to player 1 only..and picboxes 5-8 only visible to player 2?
@audiogamers11596 жыл бұрын
Sir, I know the video already has a certain time, but, could you help me? I want the Textbox of the server after a few seconds to be cleaned automatically. I already tried using textbox1.clear () but it did not work. Thank you!
@camillusblockx257710 жыл бұрын
Excellent tutorial, worked flawlessly. I'm gonna try to alter the code to use it for sending arrays of elements (string, integer, boolean) back and forth to 1 server and max 4 clients. Gonna be not simple so if you have any info of tutorials and/or books that goes about sending arrays over TcpIp then please let me know. Hope you keep up doing this, looking forward to your future work.
@VBToolbox10 жыл бұрын
Hello, Camillus! A friend of mine and I are presently working on producing a much more advanced multi-client/server TCP library for just such a system. It allows us to send any sort of custom packet type. So far we've created a functional IRC (Internet Relay Chat) system, and have experimented with sending files as byte segments. I'm not yet certain how I would go about making a tutorial, as it's pretty large and much more complex, and I'm not certain if I should actually show how the library is created or just show how to use it.
@camillusblockx257710 жыл бұрын
VB Toolbox I would love to see it, is it availlable? Maybe just give some info about how the fuctioncalls work. I'm not a expert in programming, but if I can test it and work with it, then anyone can. Looking forward to use your software.
@MW3inat0r10 жыл бұрын
oh thanks man! this channel helps me so much! you are so a nice programmer :) never close this channel please :D
@VBToolbox10 жыл бұрын
So glad that it's been helpful, MW3inat0r! Hopefully, things will settle down at work so that I can share more goodies. I appreciate the positive feedback. :-D
@daanielacosta23955 жыл бұрын
What can i do, if i want to make an android app, to send and receive messages from a desktop application made in VB, but using the web as intermediary?. VB app Web Android app
@TiborCsicsatka4 жыл бұрын
Great Tutorial, I copied all the code and ran it under Visual Studio 2017 Most of it works the same as in the tutorial except it will not transfer data to the server. The problem seems to be in the server program, I put an MsgBox on the catch of the RaiseEvent section and it said System.NullReferenceException:Object reference not set to an instance of an object. I wonder if you or anyone else would suggest a solution. Thanks.
@Malc21696 жыл бұрын
Excellent tutorial, made simple and easy to understand. I (think I) typed it word for word, and all went well BUT (there's always a but) I can only send one line - all subsequent attempts to send a line of text fail to update the textbox on the server side. Any ideas?
@FusionDeveloper6 жыл бұрын
I combined these into 1 program and think I made the IP/Port work with textboxes, but I have 1 issue. If I try to connect to an IP that it can't connect to, or let's say I think the connection is down so i disconnect and reconnect, it doesn't allow you to reconnect. I feel like there is likely some code you can do that lets you "reconnect" or "change connection IP" after attempting to connect once. I've tried everything I could think of and now I'm asking for help. I am hoping it is something very simple. Anyone with ideas or solutions will be greatly appreciated.
@TowelGamingHammer9 жыл бұрын
Will this work with VB Express 2008? I have Windows XP and cannot upgrade any further. Currently saving up for a new rig and Windows 7, but for now, I can't get a higher version than 2008 (or 2010 maybe? Unsure...)
@adityajethwa12684 жыл бұрын
Please tell us how to create bi directional
@knotsman1810 жыл бұрын
What would be the process of turning this into a multi-client chat and/or allow all the chat text inputs be sent out and displayed to each of the other clients (i.e. you can see what everyone is chatting in each of the clients)?
@VBToolbox10 жыл бұрын
We'll want to use asynchronous connection management and a means of creating and managing custom packets and events. A friend of mine has been developing a really cool library (dll) to take much of the pain out of this process, and I've been translating it into VB.NET. I hope to do a spotlight video on this soon. We intend to release the library soon, along with our sample project. :-)
@ivan47949 жыл бұрын
what if add a textbox on the client form to fill ip destination, you can the make the tutorials? thanks a lot
@rizkiadisaputra59718 жыл бұрын
how to make connection with external IP ?
@adlersongs44606 жыл бұрын
Thanks for posting this video. It was really very helpful. However I have one query. Is it possible to display a custom windows form on all client computers? I want to create two forms say form1 and form2. On click of a button on form1 I want to display form2 to selected client PC's on the same network.
@shanukrubera37928 жыл бұрын
Hey man, great tutorial! What do you suggest I do in order to create a chat application like this to both send and receive from this application?
@omega10076 жыл бұрын
Copied the code exactly but did not work. Not sure if it's a version error.
@teamhd11589 жыл бұрын
can I make it like the type stuff is in the same form? (Form1)
@lalo198519 жыл бұрын
Hello. Great video. 1 Issue, when I send data from a client, it doesn't show on my textbox until I disconnect the client. I'm puzzled by this. any help? thanks.
@jdholasca9 жыл бұрын
Very helpful thank you, i have some question here do you have any code that send "files"?
@yehyajrass5919 жыл бұрын
man how to make this client online i need to make it online because i'm making client chat server please help
@skudnu54629 жыл бұрын
I have a little problem, my Client crashes and says that the server is refusing its connection, i already forwarded the port(id like to know if thats necessary)
@skudnu54629 жыл бұрын
NGHTMRE fixed the problem, i wrote where the ip is "localhost" but i needed to change it to my internal ip. now its working thanks VB Toolbox for this great project ^^
@jasonlundeen50319 жыл бұрын
this works perfect and I got some great ideas you might like on this man ;)
@1995mavie10 жыл бұрын
thank you a lot glade to learn from you
@Xshot127 жыл бұрын
Let's say 2 people are using the same internet connect AKA LAN... How can I make it so they can chat with each other?? Please help I'm trying to make a multiplayer game and this would make it a lot easier. Don't ask how Just Please Help!
@amritajannu53627 жыл бұрын
Really nice tutorial helped me a lot. But i am just curious to know how do i respond from server to client? Could you help me with that?
@rakeshreddy26234 жыл бұрын
dude thank you for your solutions actually i am a plc programmer and also works on vb applications for data store and retrive my question is what if multi clients connected in this at the same time in my case i have two similar machines they both work simultaneously and sends the data to the server but there will be a lot of chances that they connect to the server at the same time instant in this video you have said that "im using single client only" also for taking the data you have used handler which get the data to text box what if user wants to return back some acknoledgement to client form ui, is there any special process for that like "thread-delegate-custom event"
@elhinchiammar8254 жыл бұрын
thnx a lot for this amazing tuto i have a problem in client : evry ting is ok i have no error but when i tape a text and click the send button, the text dont appear in server textbox can you help me please. thnx again