Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 24th, 2008, 8:53 AM   #1
Freaky Chris
Hobbyist Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 169
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
I/O proccessing

hi again, seems im requesting a reasonable amount of help already. Anyways here goes.

My script needs to both send and receive data from sockets, however. It is not a case of it is know when data is going to be received. So how would i go about receiving data from sockets and printing to the screen without interupting the input system. Currently i have set up a threading system to deal with all income data from the connected socket. However attempts to print this information to the screen are with little success, as the main section of the program is constantly running input commands apart from milliseconds taken to process the information inputted.

The only other way around this would be to create another script and begin streaming data between the two. For instance

main script -- all input occurs here and is sent via sockets
PC A sends data to main script
main script -- relays information to new script titled A, which then proccess all data sent from PC A
PC B sends data to main script
main script -- relays information to new script titled B, which then proccess all data sent from PC B
...

but that would mean that all input would have to be specifing which PC to send the data to for instance to send 'hi' to PC B i would have to use something like
/send PCB hi
as the input string, and all of these would occer from the main script no matter what PC it is to be sent to. so for sending large numbers of data it becomes very tedious and time consuming. As well as messy and confusing.

the latter half is not much the problem with having to send all strings via the mainscript window. However i would very much like input on methods of taking I/O at the same time.

Thanks
Freaky Chris is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB 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
Stadard C i/o problems with C++ classes Soulstorm C++ 8 Jul 15th, 2007 9:21 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC