What are the PSP Network functions?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
seventoes
Posts: 79
Joined: Sun Oct 02, 2005 4:50 am

What are the PSP Network functions?

Post by seventoes »

I am working on a game right now that will require network access, how would i be able to send packets and stuff to the master server? I know how to get all of the user's network configuration and stuff, but not how to send packets/threads/files whatever their called...

Sry if i sound noob-ie, but im new to PSP programming, but not C/C++.
sambro
Posts: 7
Joined: Thu Sep 29, 2005 4:16 pm

Post by sambro »

http://aibohack.com/psp/wifitest.htm

Search function rocks :)

-Sam

PS: Yup, they're packets. :P If you're not noob to C++ then you should have known that O.o
seventoes
Posts: 79
Joined: Sun Oct 02, 2005 4:50 am

Post by seventoes »

Well im not a noob to c++, but ive never used any networking thing before, only local apps

EDIT: Oh, and thanks for the link :)
sambro
Posts: 7
Joined: Thu Sep 29, 2005 4:16 pm

Post by sambro »

No worries.

Sorry if my post sounded rude, I didn't mean it like that :) Wrote that post not long after I woke up (slow riser)
seventoes
Posts: 79
Joined: Sun Oct 02, 2005 4:50 am

Post by seventoes »

Lol ok, but is there any simpler examples? This one has WAY more than i need, i just need to know how to send packets to other systems...
PspPet
Posts: 210
Joined: Wed Mar 30, 2005 2:13 am
Contact:

Post by PspPet »

> Lol ok, but is there any simpler examples?
The core code is in nlh.c. Look at any of the packet send parts. It is four samples in one - pick one that is closest to your case.
The other features (like picking a connection, and checking for timeouts) are things you need to do.

If you have never used Berkeley style sockets before, you may want to read up on it first.
Eventually the WiFi APIs will be supported in the SDK, and samples can be much simpler.
seventoes
Posts: 79
Joined: Sun Oct 02, 2005 4:50 am

Post by seventoes »

Oh.. Well i dont see any send functions in there... maybe i should look over it more.....
sambro
Posts: 7
Joined: Thu Sep 29, 2005 4:16 pm

Post by sambro »

You're not seeing many functions because they're only declarations in the my_socket.h file (the firmware does the actual gruntwork)

What might be easier is if you do what PspPet said and learn about old school sockets. The easiest way down that path is to learn winsock.

When you have that understood, the transition to PSP networking can almost be seamless.

Just do something like this in the my_socket.h file:

Code: Select all

  #define bind sceNetInetBind
  #define listen sceNetInetListen
  #define accept sceNetInetAccept
  #define connect sceNetInetConnect
Etc etc. The methods look strange now, but as I said earlier, a quick dabble in Winsock should get you on track.

-Sam

Pssssst... http://msdn.microsoft.com/library/defau ... erence.asp :)
Post Reply