Comments (8)
Hello. Could you please clarify, what exact steps are you taking to get that error?
from jabber-net.
I basically just changed connection parameters:
JabberClient jc = new JabberClient();
jc.OnReadText += new bedrock.TextHandler(jc_OnReadText);
jc.OnWriteText += new bedrock.TextHandler(jc_OnWriteText);
jc.OnError +=new bedrock.ExceptionHandler(jc_OnError);
jc.OnStreamError += new jabber.protocol.ProtocolHandler(jc_OnStreamError);
//JID j = new JID(jid);
jc.User = "myUser";
jc.Server = "myServer";
jc.NetworkHost = "myHost";
jc.Port = 5222;
jc.Resource = "Jabber.Net Console Client";
jc.Password = "myPassword";
jc.AutoReconnect = 3f;
GetOpt go = new GetOpt(this);
try
{
go.Process(args);
}
catch (ArgumentException e)
{
go.UsageExit();
}
I'm using Cisco Jabber.
Many thanks in advance
from jabber-net.
Are you running the code from the console example? If so, then what command line arguments are you providing?
It looks like you actually haven't passed the jid
command line argument, and it's required in the console example.
Probably you just need to remove go.Process(args)
part, if you don't want to process the command line arguments at all.
from jabber-net.
For some reason none of the arguments are passed, when provided at following schema:
[CommandLine("j", "myUser@myServer", true)]
public string jid = null;
[CommandLine("p", "myPassword", false)]
public string pass = null;
[CommandLine("n", "myHost", false)]
public string networkHost = null;
[CommandLine("o", "Port", false)]
public int port = 5222;
from jabber-net.
How are you passing them?
from jabber-net.
static void Main(string[] args)
{
try
{
new Program(args);
}
catch (Exception ex)
{
}
//Thread.Sleep(15000);
}
from jabber-net.
I think you have problem understanding the GetOpt
class. It takes the arguments from the command line and places them into the fields jid
, pass
so on.
Some of the command line arguments are explicitly marked as required = true
in the example program (e.g. jid
). From your screenshot, it looks like you're passing no arguments to the program. That's the reason GetOpt
throws an exception.
It also looks like you think the second argument of CommandLine
could define a default value for the argument. It's wrong; the second argument is description
; take a look at the source.
To solve your problem, please pass the command line arguments to the program. E.g.
JabberNet.ConsoleClient.exe -j [email protected] -p password
from jabber-net.
Closing due to a missing response from the original poster. Feel free to discuss and reopen if the issue is still unsolved.
from jabber-net.
Related Issues (20)
- This will never happen in the "if else"
- Not unique Package.ID generation. HOT 4
- NuGet package has incorrect reference to netlib.Dns HOT 3
- Jabber-net connect to Cisco Jabber HOT 7
- Can't connect with TLS 1.2 because TLS1.0 is hardcoded in StartTLS() method
- how to get message history (message archiving) using jabber-net HOT 9
- XEPs and RFCs support page with version HOT 1
- XEP-0479: XMPP Compliance Suites 2023
- Add support for SCRAM-SHA-1(-PLUS), SCRAM-SHA-256(-PLUS)
- Port to .NET Standard
- SASL EXTERNAL mechanism HOT 1
- Cannot connect to CISCO CUCM v.11 HOT 4
- HTML documentation on UntrustedRootOK looks strange
- NullReferenceException in HttpStanzaStream.OnRead HOT 2
- Compress on not work with openfire
- Deadlock HOT 10
- Stuck on disconnect in Example HOT 3
- InvalidOperationException("Socket not connected.")
- Jabber response is not delivered to recipient if sendnig thread is the same that was listened before HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jabber-net.