|
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
View previous topic :: View next topic |
Author |
Message |
methos3
Joined: 01 Feb 2008 Posts: 89
|
Posted: Tue Dec 30, 2008 4:35 am Post subject: Threads on the PS2 |
|
|
Hello there!
I am doing a program for PC that can send files and messages to a server, and its port for the PS2. On PC, I am using the Visual Studio Windows Forms applications for the GUI, and on he PS2, I am developing my own GUI from the scratch, and it's all OK, it's not difficult.
But I am developing a server that can accept multiple connections, and the socket-based functions are blocking-functions. For example, there is a function to receive a buffer, if I use it, the whola program will freeze and will continue only when someone send something! To avoid this, on PC, I use threads.
I've searched the forums and found that I can use cooperative multitasking on the PS2, but didn't find much info at all.
Can someone help me with this?
ps.: sorry for the bad english |
|
Back to top |
|
|
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
|
Back to top |
|
|
radad
Joined: 19 May 2004 Posts: 246 Location: Melbourne, Australia
|
Posted: Tue Dec 30, 2008 9:35 pm Post subject: |
|
|
This is not about threads but there are at least three existing methods for copying files between the pc and ps2.
ps2ftd - a standard ftp server for the ps2. Connect to it using any standard ftp client on the pc.
host - this makes a remote drive available for use on the ps2. The pc client makes the initial connection but from then on it really acts like a server.
ps2netfs - this allows the pc to connect to the ps2. Much like a ftp server but the protocol is unique.
Either they may suit your purpose or maybe you could learn from them. |
|
Back to top |
|
|
methos3
Joined: 01 Feb 2008 Posts: 89
|
Posted: Mon Jan 05, 2009 3:30 am Post subject: |
|
|
Whoa!
What a quick answer!
Thanks for the links, they are exactly what I was looking for, but... I won't use multithreasing with my program anymore, because I didn't get much time to work on my project, so... My server will accept only one client per time, until I learn a little more about the PS2 threads.
Radad, thanks, but what I want to do is to create my own program with my own protocol, so I can comunicate between computers and ps2's, with any choosen port. To say the truth, it's a very siple protocol, to communicate pc-pc, ps2-ps2 or pc-ps2.
Only one thing: the modules that I will need are ps2dev9.irx, ps2smap.irx and ps2ip.irx, right? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|