forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Threads on the PS2

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
methos3



Joined: 01 Feb 2008
Posts: 89

PostPosted: Tue Dec 30, 2008 4:35 am    Post subject: Threads on the PS2 Reply with quote

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
View user's profile Send private message
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Tue Dec 30, 2008 9:07 am    Post subject: Re: Threads on the PS2 Reply with quote

methos3 wrote:
ps.: sorry for the bad english

Hey, don't be. Your english is better than mine and than others out there.

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
Back to top
View user's profile Send private message Visit poster's website
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Tue Dec 30, 2008 9:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
methos3



Joined: 01 Feb 2008
Posts: 89

PostPosted: Mon Jan 05, 2009 3:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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