http libraries for use with gcc

http libraries for use with gcc

Post by Joe Nelli » Sun, 27 Feb 2000 04:00:00



Linux newbie here,

Are there any?  I am trying to do automated server requests for html pages
with cookie support using http POST and GET requests.

Does anyone have any good suggestions on websites that have tutorials on
creating a socket to the internet, connecting to a server, header querying
functions, etc.  I am mainly a windows programmer so I only know windows
system calls to do this but i do understand the general http procedure and
basic Linux o/s.

thanks.

 
 
 

http libraries for use with gcc

Post by Wolfgang Sourdea » Mon, 28 Feb 2000 04:00:00



> Linux newbie here,

> Are there any?  I am trying to do automated server requests for html pages
> with cookie support using http POST and GET requests.

> Does anyone have any good suggestions on websites that have tutorials on
> creating a socket to the internet, connecting to a server, header querying
> functions, etc.  I am mainly a windows programmer so I only know windows
> system calls to do this but i do understand the general http procedure and
> basic Linux o/s.

> thanks.

On the http layer, I recommend you searching on altavista for webpages
describing the protocol, although it's not very difficult to understand.
Just telnet to a server (port 80) and issue a few GET commands and
you'll have an idea of how simple it is.

On the tcp layer, you have to know that the Windows Winsock API is
largely based upon its unix counterpart. The first difference is that
the UNIX socket API is included in the C library. Furthermore, a few
difference resides in the naming of the constants and functions used.
I don't know why but all those people who designed Windows made
themselves a religion in changing the naming of standard functions.
You may want to refer to your local documentation for this ("info libc"
under Linux will be of great help).

I know for instance that you don't need this "WSAStartup" stuff under
UNIX. For the rest, I can recommend you to use function names you used
to use in your Windows programs and correct the errors after trying to
compilation. The main functions are still very similar between the two
systems (socket, bind, gethostname, blablabal)

Wolfgang

--
Les nombres imitent l'espace, qui est de nature si diffrente.
Pascal, Penses

 
 
 

1. getchar with gcc using pointers --using gcc not any other compiler

I need to make a same program to the below to getname and display it
and display certain character (certain element) .

#include <stdio.h>
/*
lesson01_creating_arrays_using_pointers.c */

main ()
{
float array_elements[50];
int no_array_elements;
int array_element_no;
input_array_elements(&no_array_elements,array_elements);
processing(no_array_elements,array_elements);
display_table(&array_element_no,array_elements);

input_array_elements(no_array_e,array_e)
//------------------------------------------------------
float *array_e;
int *no_array_e;
{
char another_element;
do {
printf ("Enter an array element :  ");
scanf("%f",&array_e[(*no_array_e)]);
printf ("More array_elements (y/n)  :  ");
scanf("\n");
scanf("%c",&another_element);
(*no_array_e)++;

processing(no_array_e,array_e)
//------------------------------------------------------
int no_array_e;
float *array_e;
{
float total=0;
int i=0;
do {
printf ("The array element no %d = %f\n",i,array_e[i]);
total=total+array_e[i];
i++;
printf ("\nThe average = %f\n",(float) total/no_array_e);

display_item(array_element_n,array_e)
//------------------------------------------------------
int *array_element_n;
float *array_e;
{
printf ("Enter an array element :  ");
scanf("%d",array_element_n);
printf ("\nThe array element is : %f \n",array_e[*array_element_n]);

2. linux 2.0 + 2 network cards??? HELP!!

3. Linking a GCC-compiled library using Sun Workshop

4. NFS

5. Dynamic libraries on AIX using gcc compiler

6. Can somebody describe me how to build Linux kernel, Thanks in advance.

7. static vs. dynamic libraries using gcc/g++

8. HELP Kernel upgrade!!!!

9. how can i compile shared library using gcc?

10. Shared libraries and GNU GCC using gas and gnu ld.

11. Using a library compiled with gcc ...

12. Using gcc for building shared libraries

13. Re-directing http to https using apache and other things