Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  C Header Files.  (Read 3828 times)
0 Members and 1 Guest are viewing this topic.
Offline javatypo

Junior Member





« Posted 2003-04-16 19: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 Coder


Projects: 1


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


« Reply #1 - Posted 2003-04-16 21: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

Junior Member





« Reply #2 - Posted 2003-04-17 01:31:28 »

Dont worry im not using Visual C++. Im not crazy enough to revert to microsoft products.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline javatypo

Junior Member





« Reply #3 - Posted 2003-04-17 01: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 Coder


Projects: 1


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


« Reply #4 - Posted 2003-04-17 02: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 Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #5 - Posted 2003-04-17 09: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 Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #6 - Posted 2003-04-17 09:36:25 »

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

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #7 - Posted 2003-04-17 10: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

Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


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

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

Offline mill

Junior Member




popcorn freak


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

had any problems with cheaters then?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline erikd

JGO Ninja


Medals: 15
Projects: 4
Exp: 14 years


Maximumisness


« Reply #10 - Posted 2003-04-17 11: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 Coder


Medals: 1


pixels! :x


« Reply #11 - Posted 2003-04-17 12: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

Junior Member





« Reply #12 - Posted 2003-04-17 20: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

Junior Member




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


« Reply #13 - Posted 2003-04-20 07: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

Junior Member




popcorn freak


« Reply #14 - Posted 2003-04-20 09: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

Junior Member





« Reply #15 - Posted 2003-04-20 13: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

Junior Member




popcorn freak


« Reply #16 - Posted 2003-04-20 15: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

Junior Member





« Reply #17 - Posted 2003-05-01 20:17:29 »

ill give it a shot
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (48 views)
2014-04-15 18:08:23

BurntPizza (44 views)
2014-04-15 03:46:01

UprightPath (60 views)
2014-04-14 17:39:50

UprightPath (42 views)
2014-04-14 17:35:47

Porlus (58 views)
2014-04-14 15:48:38

tom_mai78101 (81 views)
2014-04-10 04:04:31

BurntPizza (140 views)
2014-04-08 23:06:04

tom_mai78101 (240 views)
2014-04-05 13:34:39

trollwarrior1 (200 views)
2014-04-04 12:06:45

CJLetsGame (207 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!