| View previous topic :: View next topic |
| Author |
Message |
seventoes
Joined: 02 Oct 2005 Posts: 79
|
Posted: Sun Oct 02, 2005 4:54 am Post subject: What are the PSP Network functions? |
|
|
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++. |
|
| Back to top |
|
 |
sambro
Joined: 29 Sep 2005 Posts: 7
|
Posted: Sun Oct 02, 2005 6:47 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
seventoes
Joined: 02 Oct 2005 Posts: 79
|
Posted: Sun Oct 02, 2005 12:37 pm Post subject: |
|
|
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 :) |
|
| Back to top |
|
 |
sambro
Joined: 29 Sep 2005 Posts: 7
|
Posted: Sun Oct 02, 2005 6:16 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
seventoes
Joined: 02 Oct 2005 Posts: 79
|
Posted: Mon Oct 03, 2005 3:00 am Post subject: |
|
|
| 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... |
|
| Back to top |
|
 |
PspPet
Joined: 30 Mar 2005 Posts: 210
|
Posted: Mon Oct 03, 2005 3:18 am Post subject: |
|
|
> 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. |
|
| Back to top |
|
 |
seventoes
Joined: 02 Oct 2005 Posts: 79
|
Posted: Mon Oct 03, 2005 3:40 am Post subject: |
|
|
| Oh.. Well i dont see any send functions in there... maybe i should look over it more..... |
|
| Back to top |
|
 |
sambro
Joined: 29 Sep 2005 Posts: 7
|
Posted: Mon Oct 03, 2005 6:39 am Post subject: |
|
|
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: |
#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/default.asp?url=/library/en-us/winsock/winsock/winsock_reference.asp :) |
|
| Back to top |
|
 |
|