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
Threads on the PS2
Re: Threads on the PS2
Hey, don't be. Your english is better than mine and than others out there.methos3 wrote:ps.: sorry for the bad english
Back to the subject, have a read on 2 great threads about ... threads :)
http://forums.ps2dev.org/viewtopic.php?p=70355
http://forums.ps2dev.org/viewtopic.php?t=10294
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.
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.
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?
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?