GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Mar-2004, 17:29
whiteboyrules whiteboyrules is offline
New Member
 
Join Date: Mar 2004
Posts: 9
whiteboyrules is on a distinguished road

Server Application


Now what I'm looking at building is an application that acts as a server, allowing multiple users to log on, say, via telnet, allowing users to send information to the server, and the server to print information to the users screen... like what a telnet based IRC or MUD might do...

Has anyone got any ideas where I might start. I shouldn't have any troubles with the internal functions, the main thing is building the shell to receive and transmit information via the modem.

Oh, and I'm not after a whole piece of code to do what I want I'm just after ideas on what functions I should be looking at or libraries I might need to go out and download.

Thanks.
  #2  
Old 14-Mar-2004, 21:03
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hello whiteboyrules. Welcome to GIDForums.

TCP/IP sockets sounds like the perfect solution for this. TCP/IP is implemented *everywhere*. I am currently working on an implementation. I found some particularly good information here. I have the basics done and working and I just need to clean it up a bit. If it is something you are interested in, I may post it to the code forum after it is refined.

Good luck
  #3  
Old 15-Mar-2004, 03:38
whiteboyrules whiteboyrules is offline
New Member
 
Join Date: Mar 2004
Posts: 9
whiteboyrules is on a distinguished road
Ok, i forgot to mention that I am working under windows. I might eventually look at moving into Linux in the future. But to the point, the information you pointed to does initially look to be quite useful. Thanks.

Now, would the winsocks library be sufficient for my needs? I have had other people recommend using DirectX, because it can transfer the data more efficiently (although, they use it for transferring information in online 3D games)...
  #4  
Old 15-Mar-2004, 16:03
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by whiteboyrules
Ok, i forgot to mention that I am working under windows. I might eventually look at moving into Linux in the future. But to the point, the information you pointed to does initially look to be quite useful. Thanks.

Now, would the winsocks library be sufficient for my needs? I have had other people recommend using DirectX, because it can transfer the data more efficiently (although, they use it for transferring information in online 3D games)...

Yes, winsock is the Windows Socket Implementation. Here is another resource with more info. At the bottom of the page is a link to winsock related information. Also, there is a package there called Simple Socket Library. This greatly reduces the complexity of socket programming and it appears that there is a windows binary at the site.

As far as other ways to do this, there is probably a million and one. I like the TCP/IP Sockets because every system has an implementation as it is the internet protocol. But it is going to be somewhat complex. Especially when you start looking at the windows implementation...

What type of server are you building? And on what type of network? If this is a small local network with shared files you could do a poor-mans implementation using files?

Anyway, Good Luck!
d
  #5  
Old 12-May-2004, 01:16
whiteboyrules whiteboyrules is offline
New Member
 
Join Date: Mar 2004
Posts: 9
whiteboyrules is on a distinguished road
Well, I'm back with maybe a better understanding of the language and I've started fiddling with winsock... the problem is that it won't link, I keep getting all these unresolved link errors...

... as I'm typing this I just discovered myself an answer...

I might post it in case there's anyone else out there like me... in VC++ simply go to the project settings and add wsock32.lib to the linker's object/library modules section...

Erm... I have a similar error in Bloodshed Dev-C++, though the error says that there is 'C:\Dev-C_~1\Include\winsock2.h:46 unbalanced '#endif'.

Is that the same problem as above, and if so, how would I correct it... thanks
  #6  
Old 12-May-2004, 08:01
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
windows socket class: http://www.adp-gmbh.ch/win/misc/sockets.html
  #7  
Old 18-May-2004, 07:10
whiteboyrules whiteboyrules is offline
New Member
 
Join Date: Mar 2004
Posts: 9
whiteboyrules is on a distinguished road
I realise that it was a linking error, that is, I hadn't told it to include ws2_32.lib, but my issue is with running it on Dev-C++.

The thing is, I have the dodgy version of VC++, where I can't use any executables I make outside of the system, and I want to move it to Dev-C++.

I assume that under Dev-C++, you go the the Project Options, and there, click the 'Load Object Files' and add the libws2_32.a, but it doesn't want to work for me...

I'm a bit daft some days... Is there anyone who is familiar with Dev-C++ that could maybe give an explanation on how to link libraries... it's probably really simple... thanks...

(Yes, I realise that this has strayed from the post's topic many months ago...)
  #8  
Old 18-May-2004, 09:58
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hello again.

Under dev-c++, to link a library, I go under project options, to the Parameters tab and from there under the linker parameters I have a button that allows me to pick a library(*.lib) or object(*.a) file. I then adds it to the linker parameters (with full directory). Is this what you are doing? This works for me just fine. What exactly are the errors that you are getting. Are they compilation errors or linker errors?
  #9  
Old 19-May-2004, 08:43
whiteboyrules whiteboyrules is offline
New Member
 
Join Date: Mar 2004
Posts: 9
whiteboyrules is on a distinguished road
When you gave your description, I realised you must be using Dev-C++ 5... I was using 4, and using a very similar method... only it didn't work...

I downloaded 5 and it linked perfeclty...
 
 

Recent GIDBlogShare Android Apps Easily - MyAppSharer by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
uploading files into server prinzekay MySQL / PHP Forum 5 16-Mar-2004 00:00
how to use our PC as a webmail server? razahasnain Web Hosting Forum 3 17-Jan-2004 18:24
· Windows 2003 Server Reseller Special: Unlimited Domains/2 GB Space/for $19.99 contactsonia Web Hosting Advertisements & Offers 0 09-Jan-2004 05:46
web server in secure mode not connecting to http application tcsasp Apache Web Server Forum 0 06-Nov-2003 00:08
can mysql run on a separate server? zabell MySQL / PHP Forum 6 06-Jun-2003 13:32

Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:35.


vBulletin, Copyright © 2000 - 2012, Jelsoft Enterprises Ltd.