Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  C Header Files.  (Read 2617 times)
0 Members and 1 Guest are viewing this topic.
Offline javatypo

Full Member
**

Posts: 143



« on: 2003-04-16 13:45:56 »

Now, i know that you are probably wondering why i am asking about C on a java game forum, but C is the base of Java.

So does anyone know where i can get info, or the header file for making Sockets in C?
Offline jbanes

JGO Neuromancer
****

Posts: 1178


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #1 on: 2003-04-16 15:23:07 »

If you're using GCC, type 'man Socket' and it will tell you all about it. If you're using Visual C++ (how lame) there should be online help for WinSock. (It's almost the same). A quick google on "WinSock API" will get you tons of links like this:

http://burks.brighton.ac.uk/burks/pcinfo/progdocs/winsock/winsock.htm

Java Game Console Project
Last Journal Entry: 12/17/04
Offline javatypo

Full Member
**

Posts: 143



« Reply #2 on: 2003-04-16 19:31:28 »

Dont worry im not using Visual C++. Im not crazy enough to revert to microsoft products.
Games published by our own members! Go get 'em!
Offline javatypo

Full Member
**

Posts: 143



« Reply #3 on: 2003-04-16 19:32:44 »

oh, and thanks for the link.

and where do i type "man Socket"? in google? il try that btw.. so u dont need to answer if thats the answer
Offline jbanes

JGO Neuromancer
****

Posts: 1178


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #4 on: 2003-04-16 20:52:26 »

At the Bash prompt of course! :-) Time to dust off those Unix skillz and use manual pages! (thus "man") Under Windows you have the choice of compiling Win32 apps (generally using VC++ and Winsock) or you can get a real development environment and use all your favorite Unix tools!

Under just about every other OS, you already have a bash or sh prompt, so you can type it in there.

Just out of curiousity, what's wrong with Java networking anyway?

Java Game Console Project
Last Journal Entry: 12/17/04
Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #5 on: 2003-04-17 03:34:50 »

Quote
Just out of curiousity, what's wrong with Java networking anyway?

Nothing of course, but actually I thought about doing some networking code in C myself.
Not because it's better, but because it's a little more difficult to decompile and hack than a java class. Which I thought might help a little making for example a high score server 'cheater-unfriendly'.
But, I also found that this is just complicating development and it hardly helps anything as there are ways to complicate hacking in java too that work just as well. Probably better even.

Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #6 on: 2003-04-17 03:36:25 »

But maybe this was not at all what javatypo had in mind  Roll Eyes

Offline Matzon
« League of Dukes »

JGO Kernel
*****

Posts: 1805
Medals: 8


I'm gonna wring your pants!


« Reply #7 on: 2003-04-17 04:05:15 »

Quote
Not because it's better, but because it's a little more difficult to decompile and hack than a java class.


NEVER rely on Security through obscurity - It just won't work (tm)

just to barging in Grin

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #8 on: 2003-04-17 04:15:09 »

I don't.
But it might help a bit in demotivating cheaters  Smiley

Offline mill

Full Member
**

Posts: 196


popcorn freak


« Reply #9 on: 2003-04-17 04:58:14 »

had any problems with cheaters then?

Games published by our own members! Go get 'em!
Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #10 on: 2003-04-17 05:17:39 »

No. That's why I didn't really prevent myself against them yet.
But it doesn't hurt to think about it in advance, just in case.

Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #11 on: 2003-04-17 06:28:04 »

Quote
I don't.
But it might help a bit in demotivating cheaters  Smiley


hmm... i'm not sure if that would help at all. most ppl wont decompile it. the more usual (generic) approach is sniffing, reverse the data structure and sending an own build packet to the server.

as long as u dont use encryption it's way too easy :>

and demotivating doesnt really work this way - if its harder it's just a bit more fun Smiley

www.try2hack.nl <- try it. it's fun =)

弾幕 ☆ @mahonnaiseblog
Offline javatypo

Full Member
**

Posts: 143



« Reply #12 on: 2003-04-17 14:05:40 »

theres nothing wrong with java networking..

i just cant find out how to tell whether or not the user is connected to the internet.

If anyone could tell me that, it would be super awesome.. aswell as the resources to C stuff.
Offline Captain-Goatse

Full Member
**

Posts: 231


I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #13 on: 2003-04-20 01:14:39 »

Do you know how to ping?

You must know the users IP address and then "ping" that address. If test packets are not returned, user is behind firewall/ or unavailable.

I've seen this at least in couple of books.
Offline mill

Full Member
**

Posts: 196


popcorn freak


« Reply #14 on: 2003-04-20 03:23:34 »

perhaps he wants the client himself to find out if he's connected or not?

off top of my head, try to create a socket and catch the exception that is thrown when the connection fails?

Offline javatypo

Full Member
**

Posts: 143



« Reply #15 on: 2003-04-20 07:57:02 »

yeah i want the application on the users computer to beable to detect if the user is online, and then when he goes online to perform the work that must be done online.
Offline mill

Full Member
**

Posts: 196


popcorn freak


« Reply #16 on: 2003-04-20 09:03:58 »

did you try what i suggested? that is, try to create a socket and try to do so until it succeds. the best thing would be to catch something like InternetConnectionEvent when a connection is established but i think you are stuck to polling.

Offline javatypo

Full Member
**

Posts: 143



« Reply #17 on: 2003-05-01 14:17:29 »

ill give it a shot
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.139 seconds with 20 queries.