0

I tried to understand the ASN.1 . I have a Sockets client server programm. The client send an integer to the server and the server send back another number and a String. Do you think that this ASN.1 module is correct for this communication ? because i got an error with the java ASN.1 plugin for Eclipse

Unexpected token Server

 -- Creator: ASN.1 Editor (http://asneditor.sourceforge.net)
    -- Author: mehdi
    -- Created: Mon May 06 19:38:15 CEST 2013
    ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN

    Client ::= SEQUENCE {
    lientNumber INTEGER,

    }

    Server ::= SEQUENCE {
    lientNumber INTEGER,
    serverString String,
    }


    END

2 Answers2

2

The trailing commas are wrong. Only put in a comma when something follows.

Kevin
  • 1,876
  • 12
  • 17
1

As suggested, corrected ASN.1 schema would be something like that :

ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN

Client ::= SEQUENCE {
clientNumber INTEGER

}

Server ::= SEQUENCE {
clientNumber INTEGER,
serverString UTF8String
}

END
Kemal Atik
  • 307
  • 3
  • 12