Weekly Qbasic and Qb64 Lesson Topics

General Category => General QB64 Forum => Topic started by: GarrisonRicketson on April 21, 2011, 06:08:07 am



Title: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 21, 2011, 06:08:07 am
DSMan195276, or Matt,
Posted this, on qb64

http://www.qb64.net/forum/index.php?topic=3348.msg31723#msg31723
It is a good program.
 I to have always been interested in this, but don't know that much about
how it works, TCP/IP, etc, I am expeimenting useing Matts program, trying
to set up a server, but so far, even though it works fine locally, no one outside has been able to connect.
 Matt dose have a server up and running, but I don't know for how long.
 I am going to connect to it at this time,..it is great!, but no one uses it much,...
  Anyone interested in this, can get more details, useing the thread link
above.
 Also if anyone knows anything about setting up a server, any help would be appreciated,...Matt offered to help,but apparently has been busy,
 What I think I need is someone, that is willng to keep trying to connect,
and I can keep trying various settings, til it works,....
anyway, probabley there will be more on this, as I am fascinated by it,...
so I will be posting more later.
Guess thats about it from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 21, 2011, 12:51:58 pm


Just tried this program

Seemed to work ok but nobody there right now.

I dont see why the background cant be made to be light gray such
as color 7. Then almost all colors would work good.

Reason I  like light gray is cause white is bright and hurts my eyes.
But then they didnt make the program for me and I probably wouldnt use it much as Skyp is a good program for this also.
You can do this on Yahoo as well.  MSN has one called white pages I think the name of it is.

But for doing this in QB is quite a feat to say the least.

Dustie



Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 21, 2011, 01:47:43 pm
Ok , sorry Dusty, I am at the internet cafe, but still could not , get "my server" to work, but yes Matts, runs good,...
I hope he keeps it running, but that is why I am anxious to figure this out, so if and when Mats is not on line, I can run mine,..
I bet it would not be hard to change it so it loads with a light back ground,...
 I am going to go back home now, later, I will post here, when I log in to it, if you want to "chat",...yea, most of the time no one is useing it,...Unseen is trying to make a clone of skype, he says,...
i'll get back later.
 I don't really like the internet cafe, because I can't smoke, and I reached my limit,..to go with out a cig.
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 21, 2011, 09:11:50 pm

Wish I had been here to chat with you.


Finaly figured out how to do the server also.
Had to hard code my ip into the program. Guess I save
the server with my ip then wont have to enter it whenever
I decide to mess with it.


Im wondering if the server program automaticaly closes out
of the port so its no longer active when you close that program.
otherwise its not good to have an open port. good way for people
to get through to you computer.

If not how do you close it before leaving?
Dustie


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 21, 2011, 09:50:09 pm
It closes when you close the program, you can verify that by try connecting, useing localhost, if the server is closed you won't be able to connect, even locally.
Quote
Finaly figured out how to do the server also.
Had to hard code my ip into the program. Guess I save
the server with my ip then wont have to enter it whenever
I decide to mess with it.
 
Can you explain this any better ?
thanks from Garry
 And I am wondering if by anychance you have tryd connecting to mine yet ?
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 21, 2011, 10:48:18 pm

hi

Gary, you know this TCP stuff better than I do.
Ive never played with it in QB so this is a first for
me.

You exlpained the closing so I understand it.
Thats good to know as im uneasy about leaving
 ports open. Thanks

I did try connecting to your server but at the time it
wasnt online.

Guess we need to set a time to be on at same time.

I went to matts server and it was open but like you I
had to sit and talk to myself. LOL

I am in Mountian daylight time here so It should be close
to your time.

Dustie





Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 21, 2011, 11:35:46 pm
Ok Dusty,
Not really, I used to know more way back useing Dos,..anyway I keep finding more configurations, in windows, but still am not sure, I think I am closer, because, I do have it showing, and also,  I got a notice that a Java client was trying to connect, to download a update,...but thats not what I wanted,..but it dose show, my computer is recieveing incomeng clients,..
well let me see If you had any luck, I am also connected,...
form Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 21, 2011, 11:39:33 pm

its refusing to open for me.

we try latter





Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 21, 2011, 11:45:44 pm
Ok, 11:43 p.m. 21/04/2011 I am takeing it off line now, I sent a message, if you want to chat on matts, I am goin
g to connect to his, as soon as I post this. I was more bored then tired !,..but it is late,..I'll be there a little while.
and thanks for trying
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 21, 2011, 11:55:17 pm
Mine is working ok,

When I went to Matts, I seen Gary say hello
and I ansered hello back but didnt get a response
after that,

Also I could see my hello come up below his as it should. so I think its working ok

dustie


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 22, 2011, 12:36:40 am
Hi all,
    Check your firewall. My understanding is that windows blocks all port access unless it's in the approved list.
OlDosLover.

That was part, of it, I think I got that part worked out, but earlier to day, I tried with my lap top, as a server, and the comp at the internet cafe, and I completely shut off the firewall, but still nothing,..
Mat mentioned about routeing and a port number, but still had not explained,...But just now, earlier, when Dusty tried, I did get a "flash" on my screen, about someone trying to connect,..but I didn't get to it fast enough,...to see what it was... One time I was reading a step by step, on connecting 2 computers, useing a cross over cable, and for windows,...  but I never got thru the entire tut, it involved 37 steps, to get windows to allow that...they have made it incredibly complicated,...
 I guess with practice, a guy who installs and sets up networks, could run thru the 37 steps, in a couple of minuets or less,...but when you have to read each step, then look for the window,etc....That may be why it is takeing Mat so long to explain,...if he is writeing out a step ny step deal,...Any way it is late, I am closer, but also, I am starting to wonder, that, perhaps, the wireless, device, and this computer,. are not going to be able to handle this ... You are correct on the fire wall, and there is a list, to select what you want to allow or not allow, and this is where it is important to know what port numbers, also, it likes to have a name, Ie: I named the server Garry_server and it is allowed...
 Useing localhost, works great, but who likes to just talk to theyer self ?
   Guess that about it for now , thanks for the input OldsLover, and Dusty, We did end up haveing a good chat useing Mats... the pgram is good, the problem is entirely on my end, and me not knowing enough about windows...
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 22, 2011, 09:18:29 am
Quote
   we need to approve a port number?!   
This is part, when I was working with these settings, I have already
got it where port 300 is allowed, but then further along, it was asking me to put in the port number I want to use, again, and when I put in 300, it said I can't use that,it is already being used,..But keep in mind, even when I had shut the firewall, complete off,..still nothing. I had posted a question on yahoo answers, and got a reply from one guy, that really sounded like he knows what he is talking about, all though he is not familiar with qb64,..but for the TCP/IP, ports,routers etc,...that is not important,.. so I sent him the datos on my "modem", a wireless, wideband USB device, based on those, he told me it did not look like I could do this,useing that, he may be right,...Because there are many factors in this, ,it is going to be difficult,
as I just need to keep checking each thing one,by one...sometime ago, I was trying to set this up, so I could connect my laptop to this computer, useing a cross over cable, and never did get it working,
----------------------cut text out, to post in off topic----
link below:
http://weeklyqbasicandqb64lesson.smfforfree.com/index.php/topic,140.0.html


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 22, 2011, 04:11:23 pm
Apparently Mats server is no longer running, not sure, I tried several times and can't connect,
Didn't change anything in the client program,...
 Also it was kind of strange when I logged in to qb64, in the samples, where he had posted the code, for the TCP/IP chat, drawing board, no code is there any more , just the replys,...?
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 22, 2011, 04:17:22 pm
Yes I tried logging on to Mats Late last night and early this morning
and his was off. Dont think he  keeps it on all the time. Dont panic as mine worked for you this morning.

Your client program doesn't need to run when using the chat program on someone elses server.
 
Only time you need to run the Client program is when using your computer as the server. So if you couldnt connect to Mat even if he was on, it didnt have anything to do with your Client program.

I talked to you on your server last night without running my client program. :)

Dustie


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 22, 2011, 04:36:17 pm
Ok Dusty,
 Thats good, also I just checked back, to qb64 and the entire thread is there now,..,...don't know what is going there,...This is the kids computer here at home,..I'll get back later,...
from Garry Ok well I am getting my names mixed up,...when I said client, I was meaning the one used to connect, to the server,...But it was mats server we talked on, not mine,...anyway I'll get back later,..I am going to take a nap.
from Garry


Title: Re: QB64 Chat Program TCP/IP
Post by: OlDosLover on April 23, 2011, 05:58:34 am
Hi all,
    Garry and others if your firewall blocks this program then these url's may help you.
Win 7 :http://oit.ncsu.edu/resnet/firewall-allow (http://oit.ncsu.edu/resnet/firewall-allow)
WinXP :http://support.microsoft.com/kb/875357 (http://support.microsoft.com/kb/875357)

    The XP one looks very promising Garry as it describes ports.
OlDosLover.


Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 23, 2011, 09:24:46 am
Thanks for this,  since you are also useing a wireless device,prepaid, I guess, mine should work too,..but not all brands are equal,...so I am going to look into that too,but I will look at these,...
 Dusty had said, he put his Ip in to the code manually, I was wondering if you did the same ?, I tried, outting the IP in, but I get a error, in the program when I did that,...
 I will get some more detail on that later
from Garry
I looked at the links you show, the one for XP, gave me the command, that creates a text file, showing all the port numbers,IP s etc....it is help ful...
Here is my IP it is new,...if you or Dusty or anyone happen to drop in, I am going to leave it on most of the day:10:25 24/04/2011
See if you can connect....
IP: 201.116.140.246
Thanks from Garry,
P.S. I will modify this message ,when I close the server.
Note:
14:57 24/04/2011 I have shut it off for now


Title: Re: QB64 Chat Program TCP/IP
Post by: OlDosLover on April 23, 2011, 09:50:23 pm
Hi all,
    Silly me i should have read that you closed it! LOL.
OlDosLover.


Title: Re: QB64 Chat Program TCP/IP
Post by: Dustie Bear on April 24, 2011, 09:39:44 pm
  ok on your server program

Not to far down the program you will see this
maybe 25 or so lines down.

Quote
host& = _OPENHOST("TCP/IP:300")
IP$ = _CONNECTIONADDRESS(host&)
IP$ = MID$(IP$, 12)
_TITLE IP$ + " -- Server"
cl& = _OPENCLIENT("TCP/IP:300:98.127.172.227")


This last line starts with cl& = _OPENCLIENT(,,,,,,,,, Leave the  the 300: there. But put your IP after that as I show mine in there:

Then save the file and it should work then, if ya dont save it you will have to enter it each time you run it.
Dont do anything to the  line above this that says host& =   etc.

This opening and closing if you notice, Is kinda similar syntex as open a file from your hard drive only its opening a port., Well at least I think it looks that way. LOL

As far as fires walls go,  I dont know what to tell you guys. mine ran right off the bat. But I dont run a firewall and I never run with windows firewall. Its always turned off.

I do use Avast Antivirus, Its works very well. A lot better that AVG which I used for
a few years but it seems to have gone down hill lately in my opinion.

My IP number never seems to change , I think its cause or cable server isnt hiding
us behind one of there firewalls as some servers do. in that case it would.

When you run your server program your not going to see anything other than a black screen.
thats normal.
If someone joins your server to chat it will show that they joined etc, but other than that you wont see anything in the server window.

Dustie







Title: Re: QB64 Chat Program TCP/IP
Post by: GarrisonRicketson on April 24, 2011, 10:00:41 pm
Ok Dusty thanks, again,...
Yea I realized that on the black screen, down at the bottom it shows, 0 clients, til one is connected,...the accordingly 2 or 3,how ever many, I am about 90% sure it is my modem,...I was just about to go out, maybe
1/2 hour, I will be right back,
from Garry