The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
VNC Server, brings up really basic Xwindows frankkahle Linux 4 11-25-2008 08:15 AM
How do I get basic server specs from terminal? kenny123m SUN Solaris 8 11-20-2008 03:45 AM
Need some basic help itk UNIX for Dummies Questions & Answers 2 01-10-2006 05:52 PM
Basic... abey What's on Your Mind? 2 09-29-2005 03:47 AM
basic server info antalexi UNIX for Dummies Questions & Answers 2 05-05-2004 11:42 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-16-2002
jnuno jnuno is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 4
Question basic server

Hi,

Could you explain me how to send a file to the browser that connects to my server and requests GET /index.html? Do I open the file index.html and send it through the socket? What parameters should I use in write(client_fd, ???, ???) to send the file index.html to the browser?

Thanks!
  #2 (permalink)  
Old 12-17-2002
jnuno jnuno is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 4
Thumbs up I already know...

I must open the requested file and perform fread() from the file followed by write() to the socket, until fread returns 0... I'm doing this in blocks of 1024 (don't ask me why?!?)

Thanks anyway!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0