15,902,810 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 14499788 (Top 21 by date)
Member 14499788
25-Oct-19 10:53am
View
Thanks for the suggestion, but how can i build a similar function to write data
Member 14499788
25-Oct-19 10:52am
View
i have only 8 bytes to be transferred
Member 14499788
9-Oct-19 2:14am
View
Thankyou for your valuable suggestions. I will try doing the same
Member 14499788
30-Jul-19 5:20am
View
Problem is solved!!!
I used a counter for the socket class.
Thanks all for the suggestions!
I really appreciate all of you here for help people like us who are beginners.
Great work!!
cheers
Member 14499788
18-Jul-19 9:15am
View
okay thankyou! I will try.
Member 14499788
18-Jul-19 8:27am
View
GetLast returns zero error, if we click on repeat in the ASSERT file then it leads from main project to sockcore.cpp
BOOL CAsyncSocket::Accept(CAsyncSocket& rConnectedSocket,
SOCKADDR* lpSockAddr, int* lpSockAddrLen)
{
It points over her----->ASSERT(rConnectedSocket.m_hSocket == INVALID_SOCKET);
ASSERT(CAsyncSocket::FromHandle(INVALID_SOCKET) == NULL);
CAsyncSocket::AttachHandle(INVALID_SOCKET, &rConnectedSocket);
if (CAsyncSocket::FromHandle(INVALID_SOCKET) == NULL)
{
// AttachHandle Call has failed
return FALSE;
}
SOCKET hTemp = accept(m_hSocket, lpSockAddr, lpSockAddrLen);
Member 14499788
17-Jul-19 6:33am
View
hi, ASSERT is due to the WSA ERROR 10035,
Operation is blocked for non blocking operations, But how can I eleiminate this error?
Member 14499788
17-Jul-19 1:17am
View
while debugging I found that i have a problem with Accept function of the Socket.
I have attached the code below:
//Bind
m_sListener.Bind(6000);
//Listen
if (m_sListener.Listen() == FALSE)
{
AfxMessageBox(L"Unable to Listen on that port,please try another port");
m_sListener.Close();
return;
}
else
m_sListener.Listen(1);
//Accept
if (m_sListener.Accept(m_sConnected))
{
AfxMessageBox(L"TCP Connection accepted");
}
else
{
AfxMessageBox(L"TCP Connection not accepted");
}
Also in the OnInitialDialog()
void MESSDlg:: OnInitialDialog()
{
//Create
m_sListener.Create(6000);
}
while Debugging I have a ASSERT over the Accept function
and I am not able to figure out what is wrong in it.
Member 14499788
17-Jul-19 0:36am
View
TCPSocket is a class I have declared from CAsyncSocket
# pragma once
#include "pch.h"
#include "TcpSendSocket.h"
#include "MESS_TRIALDlg.h"
#include "DataFile.h"
TcpSendSocket::TcpSendSocket()
{
//UpdateData(TRUE);
}
TcpSendSocket::~TcpSendSocket()
{
}
Member 14499788
16-Jul-19 10:08am
View
But i need to sendthe data through tCP.
In UDP i used just rec() and create () .
In TCP listen(), bind(), accept(), Send().
But i think till listen() its working .
have some problems with accept(), I think, but I amnot sure.
Member 14499788
16-Jul-19 10:02am
View
the program is functioning I am able to receive data but not able to send data, Cannot find any errors!
Thats why I a m confused
Member 14499788
16-Jul-19 9:44am
View
I already did the way you mentioned and thats why i posted here!
Also I am new in to programming.
Member 14499788
12-Jul-19 5:13am
View
Actually my project is dealing with UDP and TCP Sockets.
Via UDP communication UDP packet is received , and then some editing is done and this packet is send via TCP.
But the TCP packets are not send!
this all process is done using multithread processing
Member 14499788
12-Jul-19 3:57am
View
Hi, I tried doing with many examples, but my packet is not send!
Member 14499788
5-Jul-19 2:09am
View
Hai CPallini
Thankyou for the suggestion.
my program works perfectly:):)
Member 14499788
3-Jul-19 9:49am
View
Yes thats the issue But i am not able to figure it out
Member 14499788
3-Jul-19 9:44am
View
i have created just a single socket objec
Member 14499788
3-Jul-19 9:00am
View
m_clientSocket.Create(7000, SOCK_DGRAM, FD_READ, NULL);
if (m_clientSocket.Connect(L"172.16.2.91", m_UDP_Port))
{
AfxMessageBox(L"Connection Successfull");
return;
}
else
{
AfxMessageBox(L"Connection Failed");
}
DWORD error = GetLastError();
This is the code before that,
Assert fucntion shows a error near the create and send fucntions in the program
Member 14499788
3-Jul-19 8:02am
View
Thanks!!
Member 14499788
3-Jul-19 7:02am
View
In my project, I would like to measure the continuous data form the UDP packet
Member 14499788
3-Jul-19 7:00am
View
Yeah , thanks for the suggestion!
I tried doing it many ways form internet.The main problem is I am not able to receive a continuosus udp packet. The programm stops after reciving one data packet
Show More