15,899,026 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 chand5055 (Top 13 by date)
chand5055
5-Feb-15 2:08am
View
Thank you Richard Deeming.... Its working perfect.... :)
chand5055
27-Jan-15 4:30am
View
Hi King Fisher, option2 is working fine. Thank you so much...
chand5055
27-Jan-15 4:29am
View
Thank you so much.... It is perfectly working.
chand5055
13-Nov-14 1:44am
View
Thanks Sergey Alexandrovich
chand5055
10-Nov-14 1:57am
View
Hi Sergey and gggustafson can give any suggestions by this sample code..
chand5055
9-Oct-14 3:43am
View
Yes ur correct Sinisa Hajnal. But my problem is if call came and checking ports suppose if ports are not available then how to put queue in waiting until ports available? Means automatically it should go for cal once get port available...
chand5055
1-Oct-14 4:10am
View
I added sample code here please go through it. I am planning like this to handle. Like this the queue must work on ports states.. I dont know how to make a queue continues to check the ports status.....
chand5055
1-Oct-14 4:08am
View
Deleted
// if ports available then go for makecall otherwise wait until port get free.
//ports status will be 1) free---> at initial stage
// 2) available--> after getting free stage port then change it to available
// 3) busy----> once call is connected
// After call ended then states of port wil be changed to free.
// So whenever the port is free then one number must be come from that queue.....
}
chand5055
1-Oct-14 4:07am
View
Deleted
// code in Form load
ThreadStart ts = new ThreadStart(severgetdata);
Thread serverthread = new Thread(ts);
Thread CurrentThread = serverthread;
serverthread.Start();
// Above lines starting thread.
// servergetdata()
// In this method am getting numbers which i have to dailed... Here for example am using socket layer. By telnet am sending contact number which i have to dailed
public void severgetdata()
{
byte[] bytes = new Byte[1048576];
// Establish the local endpoint for the socket.
// Dns.GetHostName returns the name of the
// host running the application.
IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName());
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 11000);
// Create a TCP/IP socket.
Socket listener = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
// Bind the socket to the local endpoint and
// listen for incoming connections.
try
{
listener.Bind(localEndPoint);
listener.Listen(10);
// Start listening for connections.
while (true)
{
Console.WriteLine("Waiting for a connection...");
// Program is suspended while waiting for an incoming connection.
Socket handler = listener.Accept();
data = null;
// An incoming connection needs to be processed.
while (true)
{
int bytesRec = handler.Receive(bytes);
data += Encoding.ASCII.GetString(bytes, 0, bytesRec);
if (data.IndexOf("<eof>") > -1)
{
break;
}
}
// Show the data on the console.
Console.WriteLine("Text received : {0}", data);
// Echo the data back to the client.
byte[] msg = Encoding.ASCII.GetBytes(data);
handler.Send(msg);
string receivedata = data;
receivedata = receivedata.Remove(receivedata);
//After getting contact numbers then am trying to put in Queue.
QueueCustomers(receivedata);
Checkports();
MakeCall();
handler.Shutdown(SocketShutdown.Both);
handler.Close();
}
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine("\nPress ENTER to continue...");
Console.Read();
}
// Here I am sending the numbers to Queue like this. after adding in queue then have to check the ports are free or not in CheckPorts() method
public void QueueCustomers(string receivedata)
{
callCustomer.contactnumber = receivedata;
CustomerQueue.Enqueue(callCustomer);
int count = CustomerQueue.Count;
}
Public void Checkports()
{
// Here am checking ports free or not.
/ /
chand5055
1-Oct-14 3:27am
View
No have to write code for ports by me only. Means if call connected then i need to change the status of that port is busy and after call then port status is free.
chand5055
1-Oct-14 2:28am
View
Its a WinForms. Ports availability code is seperatly written. Anyhow i wil come with code. Still am doing R&D and slowly developing code. Once I shaped a code atleast basic level then I wil post wit code so that u guys can help by that seeing code. Thank you so much for all of u response....
chand5055
30-Sep-14 3:33am
View
First of all Thanks for quick respomse...
Still I too dont have complete code Sinisa Hajnal but I try explain you my complete requirement.
Actually I am developing application for making call by soft phones.
In this i have fours ports means at a time i can make four calls.
Here I will get contacts number from webservices those numbers i need to put in Queue then have to check that 4 ports any atleast one port is free or not.. If free then one contact number have to pick from queue and make to dail again that keep on checking that amoung four ports any one port free then pass another number from queue.
Like this queue must be always watching that ports are free or not... if free then pass number from queue.
"Here after call ended automatically am changing port availability otherwise ports are busy like this status wil be keep on changing.. According to the status that queue must pass numbers....
Still not clear na Frown | :( .......
Trying to explain as much as possible you guys....
Thanks & Regards
S Chand Basha
chand5055
14-May-14 3:23am
View
Hi Hardik Patel,
Thanks for quick response. My requirement is taking data from the end user and after the submit button then data must inserted at a time in Database.
First user click Add button then row must generate and user enter data if he needs add one more row click on add button. Like this user can add as many rows as he required. SO I want to provide each row delete button also so that if user wants before entering into database wants to delete the row he can do it.
Here my problem is dropdown selected value is not binding to repeater so that I can insert data into database. Please provide me solution for this issue.
Show More