CSocket: Inter Client STRANGE Message Sending

I use MFC VC++ 4.2.

I am developing a simple client - client message send protocol.

I use NDK 2.0 classes on the CodeProject if anyone else also notice this 
application.

The class was derived from CSocket.

What I want to ask is:

I have succeeded in creating server-client connection and sending message. 
But the problem occured when I tried to send message inter-client more than 
ONCE! So first attempt is always succeeded and the rest are failed.

Testing condition:
I use only one local workstation to test the app. I ran 2 client apps and 1 
server.

The problem is the second attempt and so on, the message shown up in the 
client app that send the message itself, not in the other client app.

Is it normal?

If not, how to fix this?

Thank you. 
0
landon (165)
9/30/2008 8:00:01 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
417 Views

Similar Articles

[PageSpeed] 27

Stop right where you are.  Never use CSocket for anything.

First, it has a buggy implementation.

Second, it is always the wrong technical decision.

Use CAsyncSocket.

That said, you are probably using the wrong <ip,socket> pair to establish the connection.

You can take a look at my multithreaded CAsyncSocket example; the socketing works even if
you don't have a separate thread.
					joe
On Tue, 30 Sep 2008 01:00:01 -0700, Landon <Landon@discussions.microsoft.com> wrote:

>I use MFC VC++ 4.2.
>
>I am developing a simple client - client message send protocol.
>
>I use NDK 2.0 classes on the CodeProject if anyone else also notice this 
>application.
>
>The class was derived from CSocket.
>
>What I want to ask is:
>
>I have succeeded in creating server-client connection and sending message. 
>But the problem occured when I tried to send message inter-client more than 
>ONCE! So first attempt is always succeeded and the rest are failed.
>
>Testing condition:
>I use only one local workstation to test the app. I ran 2 client apps and 1 
>server.
>
>The problem is the second attempt and so on, the message shown up in the 
>client app that send the message itself, not in the other client app.
>
>Is it normal?
>
>If not, how to fix this?
>
>Thank you. 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
10/12/2008 6:13:46 AM
Reply:

Similar Artilces:

English/Spanish client IMAP
I have a EX5.5 SP4, NT server. I also have a few people in Europe using this server. I have them use IMAP/Outlook Express. I recently installed Windows 2000 pro, Spanish Edition, on a computer over there, and that user can receive mail just fine, but can't send! I turned up the logging on my server, and she actually authenticates (which would make sense, seeing as how she can receive mail), I can see that she successfully authenticates and checks each IMAP folder for new mail, and the immediatly after that I get "IMAP4 connection to (her ip address) lost. Can anyone help...

Archiving all messages in Exchange 2003 ? #2
I have enabled archiving of all messages in/out of the store in exchange 2003. However only the outgoing mails seem to appear in the designated public folder. Does anybody know why this is ?? Thanks in advance, Gary ...

Outlook 2003: How Can I Leave Messages on the Server
I am using Outlook from MS Office 2003 Professional under Windows XP Home Edition. I need to download email messages from an MS Exchange Server, but leave the original message on the server for later access from a different computer. I've spent some hours on this, some calls to help desks, and tried some things, but nothing has worked. Thanks for your help, Paul tools, options, change email options... lower left if the dialog - do you have delivery set to the mailbox or to a personal folder? Change it to the mailbox. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself O...

Entourage message
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Sometimes, not always or often, when I click on a new message received to open the message - it appears as blank. If i close entourage and then reopen it and click the message it opens fine- any reason for this and can I prevent it Thanks ...

Send Receive window.
Can someone please help. When you send or receive an email you can click on Send/Receive and a little window pops up with a green info bar letting you know whats coming in, how many, etc. This doesn't work for me anymore. It will do it only when there is nothing coming in or out. It will flash up connect/authorise/disconnect very quickly. If I have mail coming in, it will tell me down the bottom right of my screen. If i click Send/Receive while mail is been received, say 15 times nothing will happen. However once the mail is received that box will flash up 15 times quickly at...

CRM Mobile and sending Emails
When you're out on the road connecting by GPRS how do they send emails to clients that will be recorded in CRM? -- Regards Helen I don't believe this is possible. Your users will need to send the email via Outlook Mobile on their SmartPhone and then "Track in CRM" when they return to their computer. "Helen Smith" wrote: > When you're out on the road connecting by GPRS how do they send emails to > clients that will be recorded in CRM? > > -- > Regards > Helen ...

Exchange not sending mail delivery delayed
I have Exchange installed on a DC, small comany. Mail delivery had been slow and problematic. After searching the event logs, I found several messages about not being able to find a GC server. There is only one other server in the domain which is a DC and should be holding the FSMO roles. Yesterday, I made the Exchange server a GC also because the infrastructure master sometimes has problems querying the GC if on the same box. The event logs are now nearly error free, but mail is not being sent. Users will send messages and then receive a message stating, "Delivery to the fol...

Undeliverable messages
Using Exchange 5.5 SP4. What are the messages that appear in the out queue under the originator field have <> instead of a user name? Thanks "BobT" <anonymous@discussions.microsoft.com> wrote: >Using Exchange 5.5 SP4. What are the messages that appear >in the out queue under the originator field have <> >instead of a user name? Thanks They are Delivery Service Notificatons (DSN's). Of all the DSN's the most popular is the Non-Delivery Report (NDR). NDR's are sent whenevery your server accepts a message and then discovers that it cann...

This message uses a character set.....?
Some users have been complaining about this e-mail. I have no idea what it means but every once in a while, someone in the office will get this. This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set. Any help is appreciated. It means exactly what it says. You dont have the correct character sets installed to view the message ( it could be in Chinese ...

intelligent message filter moving everything to junk mail
i recently upgraded to exchange 2003 on a windows 2000 server and installed the intelligent message filter. no matter what i set the scl rating threshold for gateway blocking or store junk email configuration (in global settings/message delivery), every message that is sent from an external source gets automatically dumped into the junk e-mail folder in outlook. but when a message is sent from the same exchange box to another user on the same exchange, its fine. i also installed a utility that views the archived messages, but that utility shows a blank SCL rating. maybe thats why its ending ...

Emailing directly from Access with Send object
Emailing directly from Access with Send object command is not including default signature on stationary. If I email directly from Outlook 2007, my default siganture appears. If I email through msAccess 2002 with a command button that runs the send object command, the default signature does not appear. I have to manually select a signature. Help! Thank you! slickdock@yahoo.com wrote: >Emailing directly from Access with Send object command is not >including default signature on stationary. If I email directly from >Outlook 2007, my default siganture appears. If I email through &...

SFO Client to point to another server
Hello, I am running a pilot project with core users using SFO client in their laptops. However, when we eventually go live on the production server, how do i get these SFO clients to read from the new server? What happens to the data that is already present in the SFO Client? Do I have to uninstall and reinstall the SFO clients, if so, any specific procedure to do this? Kindly advise. Hi M.Babu, there will be a way. Uninstall and reinstall SFO - be sure, that the Client, where you uninstall SFO is online and the old SRM server exists. - install, Update or change to your production...

SENDFILE.EXE
This sendfile.exe has been very helpful to our company. we use it for starting emails automatically from a dos application. however, we now have an application where we not only want the email started....but we want it to be sent automatically without us having to hit the send button. does anyone know of the parameter (if it exists) which will send the email automatically? Any and all feedback would be much appreciated. Derek ...

delete messages by subject on specific nformation store
We are a K12 school. We are running Ex2k3 on W2k3. We have an anti-spam solution in place that sucessfully tags the subject of spam messages as 'SUSPECT'. We have all staff mailboxes in one information store and student mailboxes in another. We want to have SUSPECT mail delivered (for review) when addressed to a mailbox in the staff information store but deleted when addressed to a mailbox in the student information store (to stop the students receiving offensive mail - even if it has been flagged as SUSPECT). I know we could create a rule on every student mailbox- but we have 1600 ...

Importing Excel Data
I'm receiving the following error message when I try to import a MS Excel 2007 file into Access 2007 (into a new table): The search key not found on any record. Then it tells me the file will not be imported. I've looked at the Excel file and don't see anything wrong with it -- any suggestions? Thanks! -- Jen Scott Look here: http://www.access-programmers.co.uk/forums/archive/index.php/t-92702.html Seems to be related to indexes. Regards Kevin "Jen Scott" <JenScott@discussions.microsoft.com> wrote in message news:56037922-D70F-41...

Sending Attachments From Outlook 98 in Win XP
When I send an email from Outlook 98 with a Word attachment from my home computer which is running WinXP to my office computer, the attachment arrives as a .dat file and is garbage. Is Outlook 98 not compatible enough with WinXP to send attachments? What mail program are you using at work? If it's not Outlook (and Outlook Express is considered "not" Outlook!), you will need to make sure you send the message in HTML or Plain Text format, not Rich Text format. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply onl...

Very strange problem when inserting a picture in a 3D Chart
When trying to format the salls or the data series of a 3D Chart with a picture fill, a copy of the Worksheet the data is being taken from appears behind the picture. This is the staangest thing I have ever seen. This does hnt ha[pen when the chart is not a 3D chart. This did not happen before. We are Using Windows XP & Excel 2003. I could not find anything in the knowledgebase or support center. Has anyone else ever seen anything like this? Suggestions? ...

sending Access files
Is there a quick and easy way to send access files without Outlook blocking them. I exchange files with a limited selection of people so am happy that what I am sending and receiving is OK. I know that I can use WizZip but the knowledge database also suggests changing the .mdb extension. I don't know how to do this. Do I just right click over the file and choose open with Word? Or maybe there is a simpler way. Thanks When you send a file type that on Microsoft's potentially dangerous list, you get a message informing you that the recipient may not be able to access the file on...

Error Message #2
I loaded an Excel file (.xls) on another computer. The file will open correctly from within Excel 97 but produces an error message if opened by double clicking the file (via shortcut), which is the preferred method .. When Excel starts and opens the file an error message appears: "A document with the name [file name given] is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that is currently open, or rename one of the documents." On clicking the OK button the f...

Can not send email to Yahoo Account
I host my own domain: office.mydomain.com When I tried to send email to yahoo accounts, I get the following message: ************************************************************************************************************** Your message did not reach some or all of the intended recipients. Subject: DAFDFD Sent: 1/15/2007 5:18 PM The following recipient(s) could not be reached: xyz@YAHOO.COM on 1/15/2007 5:18 PM The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct addres...

Can't send calendar invites
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop I have recently updated to 10.2.3 and I just tried to send an invite to a colleague from my calendar and the send button doesn't appear so I have no way of sending it. The only related listing in help refers to updating to 10.1.3 but I shouldn't need to backwards update to fix should I? <br> Has anyone else had this problem and worked out a solution? ...

How to recalculate message size?
Please help... How do you get Outlook to "recalculate" message size? Example: original message has only 2K worth of text plus a large attachment file, which stores as 1MB. Then large attachment is deleted, but message still stores as 1MB instead of original 2K. "jett" <jettfree@yahoo.com> wrote in message news:08c701c366b5$f4e52ec0$a101280a@phx.gbl > Please help... How do you get Outlook to "recalculate" > message size? Example: original message has only 2K > worth of text plus a large attachment file, which stores > as 1MB. Then large...

What happens to incoming messages when exchange is down?
Our Exchange server recently went down. We have an individual who was expecting a critical email when this happened. What happens to all incoming messages that cannot be received during this time? Are the queued to retry delivery by their originating mail servers based on the individual server settings? Depends :-) If there are no other MX records, then yes, the sending server queues them and will then retry delivery until they are either delivered, or time out (typically 2 days). If you have additional MX records in place that are lower priority, those MX records will be tried...

CSocket and Recieve
Hi! I thought receive in CSocket is supposed to be blocking. I am using CSocketFile and CArchive to serialze and deserialize data and send it across from client to server. The send (called thro serialize) is blocking. But when the server processes the data and sends it back, the receive (again thro serialize <<) is not blocking. I've used this before and I know it blocks. Are there cases where the recieve acts as non blocking call? Thanks, Chan ...

message tracking log format
We are about ready to upgrade from E2k to E2k03. Yes, we know E2k07 is out but we aren't ready to go there yet :) We use the message tracking log to generate some internal security reports. We've noticed a change in some of the data. In Exchange 2000, the log showed the sender or recipient in standard smtp format user@domain In Exchange 2003, it appears that sometimes it shows in an LDAP DN format. So my questions are: 1) is that a configurable option? 2) if not, can someone explain, or point to a KB article, that explains the entries? What is confusing us is the "sometim...