Search Results

Search found 2129 results on 86 pages for 'receiving'.

Page 4/86 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Receiving a response through UDP

    - by Neo_b
    Hello. I have seen applications send a packet through UDP to an IP on some port and receiving a response. Which port does the response go to? (Btw, how can the router know that the response is for my PC, if there are no ports forwarded to my PC?) Greetings, Neo_b

    Read the article

  • NativeWindow WndProc not receiving messages

    - by BadNinja
    Could someone shed some light on why my WndProc method as implemented below isn't receiving any messages? If I put this class below in a WinForms application and pass in that application's handle, WndProc receives messages as I would expect. However, using the IntPtr returned from GetForegroundWindow() as I have below doesn't yield the same results. (FWIW, I have my code set up to execute GetForegroundWindow() when my application is hidden, so I'm certain that the IntPtr is referring to an outside application.) public class MyNativeWindow : NativeWindow { [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)] private static extern IntPtr GetForegroundWindow(); public MyNativeWindow() { this.AssignHandle(GetForegroundWindow()); } // Never called... I set a breakpoint [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] protected override void WndProc(ref Message m) { base.WndProc(ref m); } }

    Read the article

  • FormEditor receiving NULL IEditorInput object

    - by Gabriel Parenza
    Hi, I have extended IEditorInput class to define my own IEditorInput object. Furthermore, I have extended FormEditor class. I have view where I am displaying my application objects. Whenever user double clicks on items on view, I intend to display more details for this application object on the editor, which is a FormEditor. Problem I am facing is that I am receiving IEditorInput object as NULL inside extended FormEditor class. Can someone please tell me what I am doing wrong? Code: CustomFormEditor extends FormEditor CustomEditorInput extends IEditorInput In View class: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new CustomEditorInput("test"),"editor.id"); Thanks, Gaurav.

    Read the article

  • Prevent status bar from receiving touch events

    - by Typeoneerror
    Edit After further testing, it appears that the part of my button that are not clickable are where the status bar used to be. I'm hiding the status bar with : // -- Override point for customization after app launch [[UIApplication sharedApplication] setStatusBarHidden:YES]; But it's still receiving touches. Any idea on how to disable this? Is there's a bounding box on an application that receives touch events? I created a few sample round rect buttons and placed them in different places in my view. The ones in the center of the view receive touch events (and show the highlighted blue color) but if I place a button near the edges of the view, only parts of them are clickable in the simulator. Is this because of Apples style guidelines? I placed a button exactly where a UITabNavigationItem would appear and only the bottom half of it is clickable.

    Read the article

  • Android: Change activity state when receiving a phone call

    - by thetrompf
    Hi. A problem came up in my latest android programming project. The problem is I would like to change Activity that launches when the phone receives a call. Is it possible to add some text after the contact name when a call is received. I have search the web for something that could do that, and been looking in the API for hours and I cannot find anything, is it possible with reflection of something like that? I have made a class that listens to when the phone_state is receiving a call, and I can get the incomming number, but I would like to change the appearance on the screen. // Thanks in advance

    Read the article

  • Receiving a File via RFCOMM on Android

    - by poeschlorn
    Hey guys, does someone know how to receive a file on android via RFCOMM? I'm a newby to bluetooth issues, so please have patience with me. I'm looking for an approach to receive data via RFCOMM as a stream and store it somewhere on my phone. Saving data is not the problem, it works quite fine. The main issue is the implementation of the connection and the reliable retrieval of the data... This whole procedure should be implemented as an android service (so that no activity has to be launched while receiving data). What would you suggest: Local or remote service? greetz, poeschlorn

    Read the article

  • Do I have to bind an UDP socket in my client program, to receive data? (I always get WASEINVAL)...

    - by Incubbus
    Hey There, I have the following problem: I am starting WSA, then I am creating a UDP socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP) and try to recvfrom on this socket, but it always returns -1 and I get WSAEINVAL (10022)... I don´t know why?... When I bind the port, that does not happen... But it is very lame to bind the clients socket... (As far as I remember, i never had this problem before:/ )... Anyone knows why this happens?... (I am sending data to my server, which anwsers[ or at least, tries to^^])... Inc::STATS CConnection::_RecvData(sockaddr* addr, std::string &strData) { int ret, len, fromlen; //return code / length of the data / sizeof(sockaddr) char *buffer; //will hold the data char c; //recv length of the message fromlen = sizeof(sockaddr); ret = recvfrom(m_InSock, &c, 1, 0, addr, &fromlen); if(ret != 1) { #ifdef __MYDEBUG__ std::stringstream ss; ss << WSAGetLastError(); MessageBox(NULL, ss.str().c_str(), "", MB_ICONERROR | MB_OK); #endif return Inc::ERECV; }...

    Read the article

  • Receiving broadcast packets using packet socket

    - by user314336
    Hello I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses to my RENEW packet using Wireshark, but my function 'packet_receive_renew' sometimes catch the packets but sometimes it can not catch the packets. I set the file descriptor using FDSET but the 'select' in my code can not realize that there are new packets for that file descriptor and timeout occurs. I couldn't make it clear that why it sometimes catches the packets and sometimes doesn't. Anybody have an idea? Thanks in advance. Here's the receive function. int packet_receive_renew(struct client_info* info) { int fd; struct sockaddr_ll sock, si_other; struct sockaddr_in si_me; fd_set rfds; struct timeval tv; time_t start, end; int bcast = 1; int ret = 0, try = 0; char buf[1500] = {'\0'}; uint8_t tmp[BUFLEN] = {'\0'}; struct dhcp_packet pkt; socklen_t slen = sizeof(si_other); struct dhcps* new_dhcps; memset((char *) &si_me, 0, sizeof(si_me)); memset((char *) &si_other, 0, sizeof(si_other)); memset(&pkt, 0, sizeof(struct dhcp_packet)); define SERVER_AND_CLIENT_PORTS ((67 << 16) + 68) static const struct sock_filter filter_instr[] = { /* check for udp */ BPF_STMT(BPF_LD|BPF_B|BPF_ABS, 9), BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, IPPROTO_UDP, 0, 4), /* L5, L1, is UDP? */ /* skip IP header */ BPF_STMT(BPF_LDX|BPF_B|BPF_MSH, 0), /* L5: */ /* check udp source and destination ports */ BPF_STMT(BPF_LD|BPF_W|BPF_IND, 0), BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, SERVER_AND_CLIENT_PORTS, 0, 1), /* L3, L4 */ /* returns */ BPF_STMT(BPF_RET|BPF_K, 0x0fffffff ), /* L3: pass */ BPF_STMT(BPF_RET|BPF_K, 0), /* L4: reject */ }; static const struct sock_fprog filter_prog = { .len = sizeof(filter_instr) / sizeof(filter_instr[0]), /* casting const away: */ .filter = (struct sock_filter *) filter_instr, }; printf("opening raw socket on ifindex %d\n", info->interf.if_index); if (-1==(fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)))) { perror("packet_receive_renew::socket"); return -1; } printf("got raw socket fd %d\n", fd); /* Use only if standard ports are in use */ /* Ignoring error (kernel may lack support for this) */ if (-1==setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, sizeof(filter_prog))) perror("packet_receive_renew::setsockopt"); sock.sll_family = AF_PACKET; sock.sll_protocol = htons(ETH_P_IP); //sock.sll_pkttype = PACKET_BROADCAST; sock.sll_ifindex = info->interf.if_index; if (-1 == bind(fd, (struct sockaddr *) &sock, sizeof(sock))) { perror("packet_receive_renew::bind"); close(fd); return -3; } if (-1 == setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &bcast, sizeof(bcast))) { perror("packet_receive_renew::setsockopt"); close(fd); return -1; } FD_ZERO(&rfds); FD_SET(fd, &rfds); tv.tv_sec = TIMEOUT; tv.tv_usec = 0; ret = time(&start); if (-1 == ret) { perror("packet_receive_renew::time"); close(fd); return -1; } while(1) { ret = select(fd + 1, &rfds, NULL, NULL, &tv); time(&end); if (TOTAL_PENDING <= (end - start)) { fprintf(stderr, "End receiving\n"); break; } if (-1 == ret) { perror("packet_receive_renew::select"); close(fd); return -4; } else if (ret) { new_dhcps = (struct dhcps*)calloc(1, sizeof(struct dhcps)); if (-1 == recvfrom(fd, buf, 1500, 0, (struct sockaddr*)&si_other, &slen)) { perror("packet_receive_renew::recvfrom"); close(fd); return -4; } deref_packet((unsigned char*)buf, &pkt, info); if (-1!=(ret=get_option_val(pkt.options, DHO_DHCP_SERVER_IDENTIFIER, tmp))) { sprintf((char*)tmp, "%d.%d.%d.%d", tmp[0],tmp[1],tmp[2],tmp[3]); fprintf(stderr, "Received renew from %s\n", tmp); } else { fprintf(stderr, "Couldnt get DHO_DHCP_SERVER_IDENTIFIER%s\n", tmp); close(fd); return -5; } new_dhcps->dhcps_addr = strdup((char*)tmp); //add to list if (info->dhcps_list) info->dhcps_list->next = new_dhcps; else info->dhcps_list = new_dhcps; new_dhcps->next = NULL; } else { try++; tv.tv_sec = TOTAL_PENDING - try * TIMEOUT; tv.tv_usec = 0; fprintf(stderr, "Timeout occured\n"); } } close(fd); printf("close fd:%d\n", fd); return 0; }

    Read the article

  • Posting within PHP and receiving only cookie

    - by faya
    Hello I have a question. It might be sound ridiculous, but let me explain what I want to accomplish. Right now I try to embed open source forum to by site and I want to leave forum and my site databases split. When my site users are logging in I want them also automatically be logged in to the forum system. For that I want to login within my PHP code after receiving username and password in post, but I don't know how I can get only cookies in response. I have found out that I can use curl_init(), curl_exec(), curl_close() functionality, but response from curl_exec returns whole response(page content, cookies, headers). Is there a way to receive only cookies? P.S. - If my design is totally wrong please give an advise how I can embed this functionality! I would be very thankful!

    Read the article

  • Receiving SQL Server events from a CLR function

    - by Pablo Lerner
    I wrote a CLR class with several methods, which are linked as functions in a SQL Server 2005 database. When several of these functions are used in scope of one transaction or connection, I need another one to be automatically executed to clean up some stuff, at the time of transaction or connection close (either time is good for now, later I will decide which is best). I figure that receiving events from another new CLR functions can do, but I don't know how to achieve that. Can anyone point me to information on modules, documents or whatever, that can help me understand how to receive transaction or connection closing events in a CLR class, or how to execute a particular function when these events occur?

    Read the article

  • recv receiving not whole data sometime

    - by milo
    hi all, i have following issue: here is the chunk of code: void get_all_buf(int sock, std::string & inStr) { int n = 1; char c; char temp[1024*1024]; bzero(temp, sizeof(temp)); n = recv(sock, temp, sizeof(temp), 0); inStr = temp; }; but sometimes recv returning not whole data (data length always less then sizeof(temp)), only it's part. write side always sends me whole data (i got it with sniffer). what matter? thx. P.S. i know, good manner suggests me to check n (if (n < 0) perror ("error while receiving data), but it doesn't matter now - it's not reason of my problem. P.S.2 i've forgot - it's blocking socket.

    Read the article

  • Jquery Ajax not receiving php response correctly

    - by Theo
    I'm sending a JSON response from php to jquery: foreach ( $obj as $o ) { $a[ $o->key] = utf8_encode($o->id); } die(json_encode($a)); my html/jquery code is: $.ajax({ type:'POST', url: "imoveis/carrega_bairros", data: ({cidade:10}), dataType:"json", success: function(ret) { alert(ret) if(ret.success) { // ... } else alert("error"); } }); The json response is perfect (i get it on the console), but jquery is receiving a NULL ret object and it alerts "error". What's the problem???

    Read the article

  • Programmatic Reaction to Receiving New Email

    - by vicatcu
    I'm interested in automating some reactive work I do when receiving certain emails in one of my email accounts. What I would like to have happen is: On receipt of new email in the account If the new email passes the "Need to React" criteria (based on body content and subject line) 3a. Scrape some content out of the email body and subject lines 3b. Populate a template form (e.g. Excel spreadsheet) with the scraped data 3c. Print the populated form and save the populated form in some folder (e.g. as a pdf) What's the best (defined as easiest to implement by myself) approach / combination of technologies for achieving this automation?

    Read the article

  • Sending while receiving in C

    - by Spidfire
    I've made a piece of code in what's on my server, the problem is that it doesn't send while im receiving. so if i send something to client 1 to client 2, client2 only receives if he sends something himself.. how can i solve this ? /* Thread*/ while (! stop_received) { nr_bytes_recv = recv(s, buffer, BUFFSIZE, 0); if(strncmp(buffer, "SEND", 4) == 0) { char *message = "Text asads \n"; rv = send(users[0].s, message, strlen(message), 0); rv = send(users[1].s, message, strlen(message), 0); if (rv < 0) { perror("Error sending"); exit(EXIT_FAILURE); } }else{ char *message = "Unknown command \n"; rv = send(s, message, strlen(message), 0); if (rv < 0) { perror("Error sending"); exit(EXIT_FAILURE); } } }

    Read the article

  • Iphone Receiving Errors in Organizer Console

    - by user192124
    When attempting to use the app I have developed I am receiving the following errors: Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3b): unknown register number 59 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3c): unknown register number 60 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3d): unknown register number 61 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3e): unknown register number 62 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p3f): unknown register number 63 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p40): unknown register number 64 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p41): unknown register number 65 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p42): unknown register number 66 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p43): unknown register number 67 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p44): unknown register number 68 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p45): unknown register number 69 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p46): unknown register number 70 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p47): unknown register number 71 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p48): unknown register number 72 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p49): unknown register number 73 requested Sun Oct 18 17:49:38 unknown com.apple.debugserver-43[316] <Error>: error: RNBRemote::HandlePacket_p(p4a): unknown register number 74 requested Unfortunately I am not finding anything on google about RNBRemote or HandlePacket_p messages. Has anyone received anything like this before and what could be causing it? It crashes the app. Thank You

    Read the article

  • Testing Broadcasting and receiving messages

    - by Avik
    Guys am having some difficulty figuring this out: I am trying to test whether the code(in c#) to broadcast a message and receiving the message works: The code to send the datagram(in this case its the hostname) is: public partial class Form1 : Form { String hostName; byte[] hostBuffer = new byte[1024]; public Form1() { InitializeComponent(); StartNotification(); } public void StartNotification() { IPEndPoint notifyIP = new IPEndPoint(IPAddress.Broadcast, 6000); hostName = Dns.GetHostName(); hostBuffer = Encoding.ASCII.GetBytes(hostName); UdpClient newUdpClient = new UdpClient(); newUdpClient.Send(hostBuffer, hostBuffer.Length, notifyIP); } } And the code to receive the datagram is: public partial class Form1 : Form { byte[] receivedNotification = new byte[1024]; String notificationReceived; StringBuilder listBox; UdpClient udpServer; IPEndPoint remoteEndPoint; public Form1() { InitializeComponent(); udpServer = new UdpClient(new IPEndPoint(IPAddress.Any, 1234)); remoteEndPoint=null; startUdpListener1(); } public void startUdpListener1() { receivedNotification = udpServer.Receive(ref remoteEndPoint); notificationReceived = Encoding.ASCII.GetString(receivedNotification); listBox = new StringBuilder(this.listBox1.Text); listBox.AppendLine(notificationReceived); this.listBox1.Items.Add(listBox.ToString()); } } For the reception of the code I have a form that has only a listbox(listBox1). The problem here is that when i execute the code to receive, the program runs but the form isnt visible. However when I comment the function call( startUdpListener1() ), the purpose isnt served but the form is visible. Whats going wrong?

    Read the article

  • nServiceBus registering subscribers but subscribers not receiving messages

    - by Rob Ellis
    My subscriber queue isn't picking up messages. The only unusual aspect to this is that the publisher is receiving messages which are generated from a website (and then a class library) which are then WCF'd to the publisher who publishes on behalf of the website/class library. If I remove the publisher's <add Messages=""> then I get an error saying the publisher doesn't know where to route the messages. Help! I've almost cut'n'pasted the WcfIntegration and PubSub samples, so I don't know why it isn't working! PUBLISHER: <MsmqTransportConfig InputQueue="RSApp_InputQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress="" ForwardReceivedMessagesTo=""> <MessageEndpointMappings> <add Messages="Messages" Endpoint="RSApp_InputQueue" /> </MessageEndpointMappings> </UnicastBusConfig> SUBSCRIBER: <!-- SUBSCRIBER --> <MsmqTransportConfig InputQueue="RSApp_SubscriberQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress="" ForwardReceivedMessagesTo=""> <MessageEndpointMappings> <add Messages="Messages" Endpoint="RSApp_InputQueue" /> </MessageEndpointMappings> </UnicastBusConfig>

    Read the article

  • WCF method not receiving the parameters

    - by Thiago Sayão
    I have a WCF method that is not receiving the request parameters. But if I use the WCFTest client (the one that comes with visual studio) the method receives the parameters. If I capture the requests, they look very similar: If the request is this, it works: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <consultaValeCompra xmlns="http://tempuri.org/"> <dataMovto>1</dataMovto> <numSeqOperacao>2</numSeqOperacao> <numDocumento>3</numDocumento> <valorDocumento>4</valorDocumento> <tipo>5</tipo> <codPreVenda>6</codPreVenda> </consultaValeCompra> </s:Body> </s:Envelope> If the request is this, I do not get the parameters: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <consultaValeCompra xmlns="http://valeCompra/jaws"> <dataMovto>121212</dataMovto> <numSeqOperacao>003719</numSeqOperacao> <numDocumento>000000000000005555466465454546</numDocumento> <valorDocumento>000046400</valorDocumento> <tipo>0</tipo> <codPreVenda>0000000000</codPreVenda> </consultaValeCompra> </soapenv:Body> </soapenv:Envelope> The method signature is: public Retorno consultaValeCompra(string dataMovto, string numSeqOperacao, string numDocumento, string valorDocumento, string tipo, string codPreVenda) I can spot the differences, but I cannot understand why the first works and the second does not. What can I do to make it work? Thanks.

    Read the article

  • Need help receiving ByteArray data

    - by k80sg
    Hi folks, I am trying to receive byte array data from a machine. It sends out 3 different types of data structure each with different number of fields which consist of mostly int and a few floats, and byte sizes, the first being 320 bytes, 420 for the second type and 560 for the third. When the sending program is launched, it fires all 3 types of data simultaneouly with an interval of 1 sec. Example: Sending order: Pack1 - 320 bytes 1 sec later Pack2 - 420 bytes 1 sec later Pack3 - 560 bytes 1 sec later Pack1 - 320 bytes ... .. . How do I check the incoming byte size before passing it to: byte[] handsize = new byte[bytesize]; as the data I receive are all out of order, for instance using the following the read all int: System.out.println("Reading data in int format:" + " " + datainput.readInt()); I get many different sets of values whenever I run my prog although with some valid field data but they are all over the place. I am not too sure how exactly should I do it but I tried the following and apparently my data fields are not receiving in correct sequence: BufferedInputStream bais = new BufferedInputStream(requestSocket.getInputStream()); DataInputStream datainput = new DataInputStream(bais); byte[] handsize = new byte[560]; datainput.readFully(handsize); int n = 0; int intByte[] = new int[140]; for (int i = 0; i < 140 ; i++) { System.out.println("Reading data in int format:" + " " + datainput.readInt()); intByte[n] = datainput.readInt(); n = n + 1; System.out.println("The value in array is:" + intByte[0]); System.out.println("The value in array is:" + intByte[1]); System.out.println("The value in array is:" + intByte[2]); System.out.println("The value in array is:" + intByte[3]); Also from the above code, the order of the values printed out with System.out.println("Reading data in int format:" + " " + datainput.readInt()); and System.out.println("The value in array is:" + intByte[0]); System.out.println("The value in array is:" + intByte[1]); are different. Any help will be appreciated. Thanks

    Read the article

  • Unlimited SMS API/Gateway (Sending and Receiving)

    - by Naif
    I am creating a chat application which requires that users be able to send and receive sms messages through a web interface. It would be somewhat similar to the text messaging service available in yahoo mail or in aol instant messenger. The situation is this: Given the high quantity of messages that would be sent and received, paying on a per message basis is not economically feasible. How is it that sites such as yahoo, aim, and twitter can send and receive unlimited sms messages? Essentially, I am looking for a way to send and receive unlimited sms from my computer. Below is a list of some approaches I've come up with but have run into problems with as well. If just one of the approaches can be utilized effectively, then I am fine. As a note on the nature of my application: I will only be sending messages to users that explicitly sign up for the service and permit the receiving of messages. They can unsubscribe at any time. This is to prevent spam. I am aware of software such as Kannel which allows one to connect to a providers smsc gateway. However, this adds the risk of not being approved by the provider which would be unacceptable. Is there any way to significantly mitigate this risk? Utilizing a gateway provider eliminates this risk, but adds the issue of per message pricing. I am also aware of email to sms. However, I have done some testing with that and it appears that this method results in many messages being undelivered or delivered VERY late. If it weren't for that, this approach would have been ideal. Is there any way to negotiate with carriers to remove me from their filters (considering the nature of my service as stated before)? I could use a gsm modem, but even with an "unilimited" plan on a sim card, there are still limits (around 100,000 messages or so). Furthermore, from my understanding, gsm modems are capable of only sending out around a dozen messages per minute. I need to be able to send out as much as several hundred messages per second. During the first 2 months, around 10 messages per second would suffice. There are ways to send out ads with messages to cover the per message costs. However, this is a deal-breaker since it has a high chance of tarnishing the quality of service. Furthermore, I know it is possible to do it without such ads since yahoo, aim, and twitter do not send ads with their messages.

    Read the article

  • sending and receiving with sockets in java?

    - by Darksole
    I am working on sending and receiving from clients and servers in java, and am stumped at the moment. the client socket is to contact a server at “localhost” port 4321. The client will receive a string from the server and alternate spelling the contents of this string with the server. For example, given the string “Bye Bye”, the client (which always begins sending the first letter) sends “B”, receives “y”, sends “e”, receives “ ”, sends “B”, receives “y”, sends “e”, and receives “done!”, which is the string that either client or server will send after the last letter from the original string is received. After “done!” is transmitted, both client and server close their communications. How would i go about getting the first string and then going back and forth sending and reciving letters that make the string, and when finished either send or get done!? import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; import java.util.Scanner; public class Program2 { public static void goClient() throws UnknownHostException, IOException{ String server = "localhost"; int port = 4321; Socket socket = new Socket(server, port); InputStream inStream = socket.getInputStream(); OutputStream outStream = socket.getOutputStream(); Scanner in = new Scanner(inStream); PrintWriter out = new PrintWriter(outStream, true); String rec = ""; if(in.hasNext()){ rec = in.nextLine(); } char[] array = new char[rec.length()]; for(int i = 0; i < rec.length(); i++){ array[i] = rec.charAt(i); } while(in.hasNext()){ for(int x = 0; x < array.length + 1; x+=2){ String str = in.nextLine(); str = Character.toString(array[x]); out.println(str); } in.close(); socket.close(); } } }

    Read the article

  • Receiving POST data in ASP.NET

    - by grast
    Hi, I want to use ASP for code generation in a C# desktop application. To achieve this, I set up a simple host (derived from System.MarshalByRefObject) that processes a System.Web.Hosting.SimpleWorkerRequest via HttpRuntime.ProcessRequest. This processes the ASPX script specified by the incoming request (using System.Net.HttpListener to wait for requests). The client-part is represented by a System.ComponentModel.BackgroundWorker that builds the System.Net.HttpWebRequest and receives the response from the server. A simplified version of my client-part-code looks like this: private void SendRequest(object sender, DoWorkEventArgs e) { // create request with GET parameter var uri = "http://localhost:9876/test.aspx?getTest=321"; var request = (HttpWebRequest)WebRequest.Create(uri); // append POST parameter request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; var postData = Encoding.Default.GetBytes("postTest=654"); var postDataStream = request.GetRequestStream(); postDataStream.Write(postData, 0, postData.Length); // send request, wait for response and store/print content using (var response = (HttpWebResponse)request.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8)) { _processsedContent = reader.ReadToEnd(); Debug.Print(_processsedContent); } } } My server-part-code looks like this (without exception-handling etc.): public void ProcessRequests() { // HttpListener at http://localhost:9876/ var listener = SetupListener(); // SimpleHost created by ApplicationHost.CreateApplicationHost var host = SetupHost(); while (_running) { var context = listener.GetContext(); using (var writer = new StreamWriter(context.Response.OutputStream)) { // process ASP script and send response back to client host.ProcessRequest(GetPage(context), GetQuery(context), writer); } context.Response.Close(); } } So far all this works fine as long as I just use GET parameters. But when it comes to receiving POST data in my ASPX script I run into trouble. For testing I use the following script: // GET parameters are working: var getTest = Request.QueryString["getTest"]; Response.Write("getTest: " + getTest); // prints "getTest: 321" // don't know how to access POST parameters: var postTest1 = Request.Form["postTest"]; // Request.Form is empty?! Response.Write("postTest1: " + postTest1); // so this prints "postTest1: " var postTest2 = Request.Params["postTest"]; // Request.Params is empty?! Response.Write("postTest2: " + postTest2); // so this prints "postTest2: " It seems that the System.Web.HttpRequest object I'm dealing with in ASP does not contain any information about my POST parameter "postTest". I inspected it in debug mode and none of the members did contain neither the parameter-name "postTest" nor the parameter-value "654". I also tried the BinaryRead method of Request, but unfortunately it is empty. This corresponds to Request.InputStream==null and Request.ContentLength==0. And to make things really confusing the Request.HttpMethod member is set to "GET"?! To isolate the problem I tested the code by using a PHP script instead of the ASPX script. This is very simple: print_r($_GET); // prints all GET variables print_r($_POST); // prints all POST variables And the result is: Array ( [getTest] = 321 ) Array ( [postTest] = 654 ) So with the PHP script it works, I can access the POST data. Why does the ASPX script don't? What am I doing wrong? Is there a special accessor or method in the Response object? Can anyone give a hint or even know how to solve this? Thanks in advance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >