SDK IP Functions
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2008 at 18:20, xxxxxxxx wrote:
Howdy,
Just bumping this thread up again. ;o)
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2008 at 18:21, xxxxxxxx wrote:
Up!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/03/2008 at 03:06, xxxxxxxx wrote:
Up!^^
@Cactus Dan:
ipconnection* ipc = GeIpOpenOutgoing(hostname, thread, ferr);?
How do you initialize the thread and ferr? Thanks
I try to catch the Bytes via WireShark Network Protocol, perhaps I get a little overview, how to control it. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/03/2008 at 03:31, xxxxxxxx wrote:
I'll try to sort this out this week and to provide an example how to use these functions.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/03/2008 at 05:10, xxxxxxxx wrote:
Great announcement
Thanks...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/03/2008 at 07:07, xxxxxxxx wrote:
Howdy,
Thanks.
In the meantime if we can't get a working example, an alternative might be to create a button named "Check for Updates" and then use the GeOpenHTML() function to open a web page in the default browser when the button is clicked. ;o)
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/04/2008 at 02:39, xxxxxxxx wrote:
Hi,
Unfortunatly I still can't provide you with an example. I have to do some more background reading about this subject (TCP/IP and all).
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/04/2008 at 06:34, xxxxxxxx wrote:
Howdy,
> Quote: Originally posted by Shawni on 31 March 2008
>
> * * *
>
> How do you initialize the thread and ferr? Thanks
> I try to catch the Bytes via WireShark Network Protocol, perhaps I get a little overview, how to control it.
>
>
> * * *Yes, this is one of the questions in my mind, too. If you can give us some info about what thread we should use, and how to get that thread? Or do we have to create our own background thread, and how would we go about that?
If you can give us an example of that, maybe some of us can also do some studying and experimenting. ;o)
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/04/2008 at 02:15, xxxxxxxx wrote:
The thread can be a thread passed by Cinema, for instance in a videopost plugin, or your own thread. You would call for instance GeIpWaitForIncoming within the Main() of your thread and pass this. ferr is just a LONG that is filled with the error code, you should check for ferr != 0. The IP address for GeIpOpenListener() is encoded like this (take 127.0.0.1 for example)
>
\> (127 << 24) + (0 << 16) + (0 << 8) + 1 \> or 7f000001 \>
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/04/2008 at 12:57, xxxxxxxx wrote:
Quote: Originally posted by kuroyume0161 on 18 December 2007
>
> * * *
>
>
> I tried the SendMailAvailable() and SendMail() without any success (say, for a quick means of sending me logs). SendMailAvailable() always returned FALSE.
>
> * * *Hi,
have you been able to send the e-mail finally? I still cannot. However SendMailAvailable() returns TRUE in my case. But I am unable to pass t_to parameter to the SendMail function. If I call it with NULL for t_to the default system mailer (thunderbird in my case) opens with right values for body and subject filled in. But as soon as t_to differs from NULL or empty string Cinema crashes. Does anyone successfully passed this parameter to the function?
Here is the code:
>
String toadresa = "[email protected]"; \> if (SendMailAvailable()) { \> SendMail(String("subject"),&toadresa;,NULL,NULL,NULL,String("body"),SENDMAIL_SENDDIRECTLY); \> }
Thanks in advance.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/02/2009 at 09:42, xxxxxxxx wrote:
Hi,
are there any news about the IP functions and their documentation?
I managed to set up a thread in C4D waiting for an incoming connection on a given port. When the connection is initiated, I call GeIpBytesInInputBuffer and GeIpReadBytes, but both always give me 0 as return, although I'm sending data from the other end. And as far as I found out, there's no way of telling that the connection dropped, since there's no function for asking about the connection status and the GeIpBytesInInputBuffer and GeIpReadBytes still return 0 after I closed the connection from the other side.It am eager to use the IP functions, so it would be great if someone could help me out.
cheers
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/12/2009 at 10:29, xxxxxxxx wrote:
Is there any news about this? I wonder why it´s so hard to get an answer for this IP issue. I mean some programmer must have made this available and it´s only a handful of functions so why is it so hard to provide a code sample? Especially when so many people ask for it.
I´d really appreciate any info if this will be resolved or if the functions in the SDK are simply unusable in their current state.
All my attempts are leading to nowhere. I could establish a connection and even reading bytes does return something (though I don´t know what) but I have absolutely no clue what this tells me or how to use this for a real purpose (e.g. getting files from a server).
I am looking at external libraries now but if there was a chance to not rely on external libraries I definetly would.
Thanks
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/12/2009 at 15:27, xxxxxxxx wrote:
ok, I tried to send a HTTP command thru the established IP connection on standard port 80 but whenever I call GeIpWaitForIncoming, it never returns (passed listener is correctly established before). C4D idles and I can´t do anything anymore.
Do I need this at all? I am not fully sure I understand the listener intention but I thought it was necessary for getting the packages back. Is that so? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/12/2009 at 07:29, xxxxxxxx wrote:
Sorry for not answering sooner. I'll try to get an example from the developers. Unfortunatly I have no knowledge about the workings of network connections myself so I can't answer directly.
PS. I'll address this asap in the new year. There is no chance for me to solve this over the holidays.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/12/2009 at 08:26, xxxxxxxx wrote:
thanks Matthias. Here is example code I wrote which apparently doesn´t work but shows how I thought it would be working. Maybe it helps resolving this faster (or helps others to resolve with us).
LONG ferr = 0; //Öffne IP Verbindung mit Standard Port 80 für HTTP anfragen connection = GeIpOpenOutgoing("www.dpit2.de:80",this->Get(),10,100,FALSE,&ferr); if(!connection) return; if(ferr!=0) GeIpCloseConnection(connection); //Sende HTTP Anfrage für index.html const CHAR httpbuf[44] = "GET http://www.dpit2.de/index.html HTTP/1.0"; GeIpSendBytes(connection,httpbuf,sizeof(CHAR)*44); //Listener um Serverantwort zu erhalten (?? Hmm, macht irgendwie keinen Sinn...) listener = GeIpOpenListener(0,80,this->Get(),1,FALSE,&ferr); if(!listener) return; if(ferr!=0) GeIpCloseConnection(listener); //Antwortverbindung (scheint für immer zu idlen...) IpConnection* incoming = GeIpWaitForIncoming(listener,this->Get(),&ferr); GePrint("zurück aus dem Vakuum"); //Größe des Antwortbuffers LONG bytes = GeIpBytesInInputBuffer(incoming); //Falls da was ist.. if(bytes>0) { //Einlesen void* buffer = GeAlloc(bytes); GeIpReadBytes(incoming,buffer,bytes); //dealloziieren des Buffers GeFree(buffer); } //Antwortverbindung kappen GeIpCloseConnection(incoming);
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/01/2010 at 10:16, xxxxxxxx wrote:
*pushing daisies*
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/01/2010 at 09:00, xxxxxxxx wrote:
Just wanted to check back when you approximately will be able to provide an example. Any chance of a foreseeable point in time?
Thanks
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/01/2010 at 09:39, xxxxxxxx wrote:
Sorry I can not give an estimate.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/01/2010 at 11:31, xxxxxxxx wrote:
ok thanks. Then I´ll be waiting...and I will be waiting.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/01/2010 at 00:56, xxxxxxxx wrote:
With GeIpOpenOutgoing, you try to connect to someone listening.
With GeIpOpenListener you start listening yourself on some port, and when someone trys to connect to you, you get a connection.Sending data worked fine for me, receiving should too.
I'll include a testserver and a testclient I did a long time ago, the server should display the message sent through:
IpConnection *con;
con = GeIpOpenOutgoing("127.0.0.1:6000", bt, 10, 100, FALSE, &ferr);
CHAR buf[7] = "blabla";
GeIpSendBytes( con, buf, 7 );on the same connection you can ofcoure also try to receive (wont work with my testserver though, since it doesnt send anything )
btw, it should always be a good idea to escape your sending/receiving buffer with '\0' or '\r\n'
testserver, written in c++:
it listens on port 6000 and accepts any connection, when it receives something it displays it.#include "stdafx.h"
#include "iostream"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "windows.h"
#include "winsock2.h"#define BUF_SIZ 4096
int rcv_Client(SOCKET s) {
char buf[BUF_SIZ]; // Buffer für empfangene Daten
int rcvCnt=0;
// Daten empfangen(blockiert)while(true){
rcvCnt=recv(s, buf, sizeof(buf)-1, 0);
if (rcvCnt<=0) {
printf("geschlossen");
break;
}
buf[rcvCnt]='\0';
printf("empfangen: %s\n", buf);
}// Verbindung schließen
closesocket(s);return 0;
}int main() {
long result; // Enthält die Rückgabewerte der Funktionen
WSADATA wsa; // Initialisierungs-Daten// Mit WSAStartup werden die Sockets initialisiert
result = WSAStartup(MAKEWORD(2, 0), &wsa);
if(result != 0){
printf("Fehler bei WSAStartup() : Code %d\n", result);
return 0;
}
else {
printf("WSAStartup() erfolgreich!\n");
}SOCKADDR_IN addrBind; // Daten für das Binden an einen Port
// Initialisieren der Struktur SOCKADDR_IN
memset(&addrBind, 0, sizeof(SOCKADDR_IN));
addrBind.sin_port = htons(6000);
addrBind.sin_family = AF_INET;
addrBind.sin_addr.s_addr = ADDR_ANY;// Initialisierung des socketAccept
SOCKET socketAccept=socket(AF_INET, SOCK_STREAM, 0); // Socket, der Verbindungen annimt
result=bind(socketAccept, (SOCKADDR* ) &addrBind, sizeof(SOCKADDR_IN));
if(result == SOCKET_ERROR) {
printf("Fehler in bind() : Code %d\n", WSAGetLastError());
return 0;
}
else {
printf("bind() erfolgreich!\n");
}
// socketAccept geht in den "listen-mode"
result = listen(socketAccept, 10);
if(result == SOCKET_ERROR) {
printf("Fehler in listen() : Code %d\n", WSAGetLastError());
return 0;
}
else {
printf("listen() erfolgreich!\n");
}SOCKET socketConnect; // Socket, der eine Verbindung enthält
sockaddr_in client;
int cli_size=sizeof(client);while(true)
{
// accept() blockiert solang, bis eine Verbindung angenommen wurde
socketConnect = accept(socketAccept, (sockaddr* ) &client, &cli_size);
if(socketConnect == SOCKET_ERROR) {
printf("Fehler in accept() : Code %dProgramm wird fortgesetzt\n",
WSAGetLastError());
continue;
}
else {
SOCKADDR_IN addrTemp;
memset(&addrTemp, 0, sizeof(SOCKADDR_IN));
int len = sizeof(addrTemp);if (getpeername(socketConnect, (sockaddr* ) &addrTemp, &len) < 0)
printf("Fehler gepeername()");
else {
printf("%s:%d verbunden\n", inet_ntoa(addrTemp.sin_addr), ntohs(addrTemp.sin_port));
}
rcv_Client(socketConnect);
}
}
}