Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer backup black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB: Connect to a remote host?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Maggz's Avatar
Senior Member with 621 posts.
 
Join Date: Jun 2003
Location: Mass
Experience: Advanced
28-Jan-2004, 06:31 PM #1
Question VB: Connect to a remote host?
I want to write some code for my game im working on that will allow users to submit scores, check for updates, and maybe view a message of the day. If this can be done or anyone has any good tutorials I can read up on please enlighten
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
29-Jan-2004, 08:14 PM #2
What you're wanting to do requires a central machine that will act as a server for incoming socket connections. Once you have established a connection and applied whatever security measures you feel are appropriate for authentication, the messages that you send back and forth between the client and server are completely up to you. What I've done with wireless communications layer is to send a message containing (1) a command prefix; (2) the length of the data stream and (3) the data stream itself. The server validates the length of the data stream against what is expected (element 2) to verify that all the data sent was received, interprets the command prefix as an instruction, and sends a reply to the sender using the same format. While the wireless comm layer that I've developed is in C++, VB has the same capacity for using WinSock. VB, however, goes about it a bit differently. VB uses a data received event to notify the application that data is incoming while you can "block" on the socket until a reply is received in C++. I prefer the latter as it is much simpler to manage a synchronous process that way. What I've also done when I need the front end in VB is to develop the socket communications in C++ and put it all in a DLL that I call from the VB application, thus achieving the synchronous processing that I need.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:32 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.