Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-2007, 06:45 AM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Rep Power: 6
Alhazred is on a distinguished road
Default [C] Server doesn't send a message on mailslot

I'm writing a client-server software which should emulate an email service. I'm now at the beginning and I'm trying to let communicate the client and the server process. I have no problem writing a new email, I send it to the server and the server saves it. I have a problem when I have to read an email from the server.
The client sends the request, the server receives it and read the email, but it doesn't send the message to the client, I've seen the server doesn't write on the mailslot, the number of bytes written is always 0.

Can you see the problem?

sorry for my english... I'm italian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-23-2007, 06:46 AM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Rep Power: 6
Alhazred is on a distinguished road
Default

Here is the source code:
- Server
- Client
- email, this must be inside the folder where server is placed.
link copy-paste is required to open these pages on the browser.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-09-2007, 01:22 PM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Rep Power: 6
Alhazred is on a distinguished road
Default

I solved some problems... now I have a problem with the function "Leggi email" ("LeggiDaFile()" inside the server code) which should read an email on the server, the server should read a text file and send the content to the client, I can't do the last part. The server reads the file and fills the structured type but doesn't send it through the mailslot to the client, I have an "Access Denied" error.

Why does it happen? I set read/write flags.

Updated code is available at the links in the first post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-13-2007, 06:48 AM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Rep Power: 6
Alhazred is on a distinguished road
Default

I found a reason why the problem could happen, messages sent from server must be less than 400 bytes and mine were 404 bytes.
Now the size of my messages has been changed to stay under 400 bytes, but still have problems.
It should be due to security attributes, I set NULL and it seems I have to set a security attribute structure. Unfortunatly can't understand how to do reading MSDN.
Can you help me?

Changed code linked in the first post.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change method to send sql server sproc XML hoser2001 Database & Database Programming 0 07-17-2007 10:35 AM
Delphi Sockets : Simple client and server program tosh5457 Pascal/Delphi 0 05-26-2007 12:00 PM
Global variables (SERVER) Jaan PHP Tutorials 0 03-22-2007 10:43 PM
Tutorial: Proxy Servers Lop Tutorials 7 01-02-2007 04:53 AM
game server mod John C and C++ 8 08-20-2006 11:01 AM


All times are GMT -5. The time now is 04:45 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads