HelpSimple Socket Chat

Posts 1–11 of 11 · Page 1 of 1
Simple Socket Chat
So, i've recently been using a Socket chat for communication between my applications and a small server i run off my old desktop so i can update my applications and broadcast MOTD's, etc. However, i've noticed that my method isn't at all reliable nor time efficient as it is kind of slow. I will post a snippet of the socket chat later on. But for now, i was wondering whether there is a more efficient or reliable method.

Also, seeing as my IP for the desktop sometimes does change would there be a more reliable method for this (Someone suggested DNS or a VPS but no thx. broke atm.)?

Edit: By server i mean an application i made to respond to the client's requests and send out data under my control.
Quote Originally Posted by Raow View Post
...
Also, seeing as my IP for the desktop sometimes does change would there be a more reliable method for this (Someone suggested DNS or a VPS but no thx. broke atm.)? ...
I'd go with dns. A free one like "noip dotcom" ...they have a client-side program that runs on your desktop pc and connects to their dns server so keep your ip up to date. Worked well for me before. There aren't a whole lot of other options that I can think of.

Looking forward to post. All the examples I've seen are either synchronous or 1-thread-per-client which doesn't scale well. If you don't expect a lot of connections, I might be able to help out. I posted something similar a week ago, but didn't get much response, hopefully you do.
Quote Originally Posted by abuckau907 View Post
I'd go with dns. A free one like "noip dotcom" ...they have a client-side program that runs on your desktop pc and connects to their dns server so keep your ip up to date. Worked well for me before. There aren't a whole lot of other options that I can think of.

Looking forward to post. All the examples I've seen are either synchronous or 1-thread-per-client which doesn't scale well. If you don't expect a lot of connections, I might be able to help out. I posted something similar a week ago, but didn't get much response, hopefully you do.
Thanks man, i actually know a guy who hosts a few DNS Servers so he may get me a freebie.
I used to have an account at dyn(dot)com and that was alright i suppose.
I'm more so just looking for a more reliable way of sending a string/file from one IP to another.
Also, i'll dig up the source for the Socket chat after dinner.

Edit: I'm using something similar to: http://www.dreamincode.net/forums/to...an-with-vbnet/ⓘ (If outside links to this site aren't allowed, i'll just C+P the post.)
Maybe you're trying to send commands while a file transfer is happening, which causes the error?

Post your actual code plz and I'll mess with it, maybe add me on skype : p
Quote Originally Posted by abuckau907 View Post
Maybe you're trying to send commands while a file transfer is happening, which causes the error?

Post your actual code plz and I'll mess with it, maybe add me on skype : p
I'm not really getting any error's :/ To my knowledge, the file sending shit and chat is on two different ports with two different defined listeners and senders.

Not too knowledgeable with tcp.


Added: It just seems a bit slow, that's all.
So i was just wondering if there's a faster alternative.
On a local wired network? What speeds are you getting? And what did you mean by unreliable?
Quote Originally Posted by abuckau907 View Post
On a local wired network? What speeds are you getting? And what did you mean by unreliable?
No, ofc not.
Just had it like that for testing.
? Testing on a local network would be a good* thing, to figure out your best-case results. Then see how it does over internet.
What speeds are you getting? How much time to transfer a 1 gig file? 10mb?
What do you mean by unreliable?
Post code?
Quote Originally Posted by abuckau907 View Post
? Testing on a local network would be a good* thing, to figure out your best-case results. Then see how it does over internet.
What speeds are you getting? How much time to transfer a 1 gig file? 10mb?
What do you mean by unreliable?
Post code?
Can't post the code atm, on a school laptop.

And i dunno, i haven't really focused on file transfers :/
Mainly sending strings/.messages to other ips.

And, i guess i mean dynamic, not reliable and the vps idea seems to be the best option.

It just seems to be a little bit slow that's all, i was possibly hoping for a more instant method of communication considering the amount of instant messaging applications that are out there.
Sending a few-bytes string is taking too long? ..idk until you post actual code.

Only use dns once on start-up (as opposed to each time you send a message to the server?)
I don't understand which part is 'slow.'

"more instant" ? tcp/ip should take < 1000ms to send a msg under 1kb.

Please explain, I obviously don't understand : )

edit: How many clients are you trying to support at one time?
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us