Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to map openConnection in C. Need Low level inputs for this.  RSS feed

 
Benedict Dsilva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to map the function openConnection(URL Class), and setDoInput & setDoOutput(URLConnection Class) into C.
Am not finding the proper place about where i would get the low level implementation of this. Also, is it possible to actually get the code through which these functions are written?

Please do lend a helping hand as soon as possible.

Thanks & Best Regards
Benny
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look in the root directory of your SDK directory you will see a src.zip file (if you installed sources). That contains the source for the classes you want. As for a direct map betweeen URL/URLConnection and something in C, I don't think there is anything very similar. C is a lower-level language than Java and Java hides a lot of details that one must deal with explicity in C. A quick Google search turned up this example for the GNU C library, in case you are using Linux. There's probably something very similar available in Win32.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!